contrib/*: replace || exit with global set -e parameter

This commit is contained in:
Jan-Tarek Butt 2019-10-12 13:16:39 +02:00
parent 22442c5fcd
commit 22f3ccb8b9
2 changed files with 8 additions and 8 deletions

View File

@ -1,16 +1,15 @@
#!/bin/bash #!/bin/bash
set -e
# Script to output the dependency graph of Gluon's packages # Script to output the dependency graph of Gluon's packages
# Limitations: # Limitations:
# * Works only if directory names and package names are the same (true for all Gluon packages) # * Works only if directory names and package names are the same (true for all Gluon packages)
# * Doesn't show dependencies through virtual packages correctly # * Doesn't show dependencies through virtual packages correctly
shopt -s nullglob shopt -s nullglob
pushd "$(dirname "$0")/.." >/dev/null || exit pushd "$(dirname "$0")/.." >/dev/null
escape_name() { escape_name() {
@ -40,6 +39,6 @@ for makefile in ./package/*/Makefile; do
done done
done | sort -u done | sort -u
popd >/dev/null || exit popd >/dev/null
echo '}' echo '}'

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
# Script to list all upgrade scripts in a clear manner # Script to list all upgrade scripts in a clear manner
# Limitations: # Limitations:
# * Does only show scripts of packages whose `files'/`luasrc' directories 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)
@ -25,12 +26,12 @@ else
fi fi
pushd "$(dirname "$0")/.." >/dev/null || exit pushd "$(dirname "$0")/.." >/dev/null
find ./package packages -name Makefile | while read -r makefile; do find ./package packages -name Makefile | while read -r makefile; do
dir="$(dirname "$makefile")" dir="$(dirname "$makefile")"
pushd "$dir" >/dev/null || exit pushd "$dir" >/dev/null
repo="$(dirname "$dir" | cut -d/ -f 2)" repo="$(dirname "$dir" | cut -d/ -f 2)"
dirname="$(dirname "$dir" | cut -d/ -f 3-)" dirname="$(dirname "$dir" | cut -d/ -f 3-)"
@ -42,7 +43,7 @@ find ./package packages -name Makefile | while read -r makefile; do
for file in "${SUFFIX2}"/*; do for file in "${SUFFIX2}"/*; do
echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX2})" echo "${GREEN}$(basename "${file}")${RESET}" "(${BLUE}${repo}${RESET}/${dirname}${dirname:+/}${RED}${package}${RESET}/${SUFFIX2})"
done done
popd >/dev/null || exit popd >/dev/null
done | sort done | sort
popd >/dev/null || exit popd >/dev/null