contrib/lsupgrade.sh: show upgrade scripts in luasrc directories

This commit is contained in:
Matthias Schiffer 2016-07-29 22:30:11 +02:00
parent 284c61d98e
commit f2feea2d3a
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 8 additions and 4 deletions

View File

@ -2,10 +2,11 @@
# Script to list all upgrade scripts in a clear manner
# Limitations:
# * Does only show scripts of packages whose `files' directory represent the whole image filesystem (which are all Gluon packages)
# * Does only show scripts of packages whose `files'/`luasrc' directories represent the whole image filesystem (which are all Gluon packages)
SUFFIX=files/lib/gluon/upgrade
SUFFIX1=files/lib/gluon/upgrade
SUFFIX2=luasrc/lib/gluon/upgrade
shopt -s nullglob
@ -35,8 +36,11 @@ find ./package packages -name Makefile | while read makefile; do
dirname="$(dirname "$dir" | cut -d/ -f 3-)"
package="$(basename "$dir")"
for file in "${SUFFIX}"/*; do
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX})"
for file in "${SUFFIX1}"/*; do
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX1})"
done
for file in "${SUFFIX2}"/*; do
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX2})"
done
popd >/dev/null
done | sort