Skip to content

Commit

Permalink
Fix script after PR #2
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Jul 25, 2020
1 parent 39d6beb commit 5cf3b63
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions pspdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,15 @@ if [ $1 ]; then
# Sort and run the requested build scripts.
ARGS=(`printf "%.2d\n" $* | sort -n`)

for (( i = 0; i < ${#ARGS[*]}; i++)); do
found=false
for (( j = 0; j < ${#BUILD_SCRIPTS[*]}; j++ )) ; do
if [ `echo ${BUILD_SCRIPTS[j - 1]} | grep -c ${ARGS[i - 1]}` != 0 ]; then
found=true
"${BUILD_SCRIPTS[j - 1]}" || { echo "${BUILD_SCRIPTS[j - 1]}: Failed."; exit 1; }
else
found=false
fi
for ARG in ${ARGS[@]}; do
found=0
for SCRIPT in ${BUILD_SCRIPTS[@]}; do
if [ `basename $SCRIPT | cut -c -2` -eq $ARG ]; then
found=1
"$SCRIPT" || { echo "$SCRIPT: Failed."; exit 1; }
fi
done
if [ !found ]; then
{ echo "${ARGS[i]}: Script not found.";exit 1; }
fi
[ $found -eq 1 ] || { echo "$ARG: Script not found."; exit 1; }
done
else
# Run all the existing build scripts.
Expand Down

0 comments on commit 5cf3b63

Please sign in to comment.