Skip to content

Commit

Permalink
manage.sh, adds 'clean' command
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh-0 committed Jan 17, 2024
1 parent 8151a2d commit 40aa571
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if test ! "$cmd"; then
echo
echo "available commands:"
echo " build build project"
echo " clean removes generated files"
echo " release build project for distribution"
echo " deps.update update project dependencies"
exit 1
Expand Down Expand Up @@ -49,6 +50,21 @@ elif test "$cmd" = "deps.update"; then
./manage.sh build
exit 0

elif test "$cmd" = "clean"; then
shopt -s nullglob # continue when glob below is empty
for file in *--maintainers.txt; do # created during normal operation
rm "$file"
echo "deleted: $file"
done
tbd=( linux-amd64 linux-amd64.sha256 )
for file in "${tbd[@]}"; do # created with ./manage.sh release
if [ -e "$file" ]; then
rm "$file"
echo "deleted $file"
fi
done
exit 0

# ...

fi
Expand Down

0 comments on commit 40aa571

Please sign in to comment.