autostart-manage/autoinstall/before.sh
Tobias Reisinger 056b7fc89e
Some checks failed
/ build-artifacts (autoinstall) (push) Has been cancelled
/ build-artifacts (autostart-manage) (push) Has been cancelled
/ upload-release (push) Has been cancelled
Fix wrong exit in autoinstall/before.sh
2024-01-12 03:14:51 +01:00

23 lines
387 B
Bash

#!/usr/bin/env bash
action=${action:?}
# if action is run or completions, do nothing
if [ "$action" = "run" ] || [ "$action" = "completions" ]
then
return
fi
clean=${args[--clean]:-}
target=${args[target]:?}
if [ "$action" = "exe" ]
then
target="$HOME/.local/bin/$target"
fi
if [ -n "$clean" ] || [ -n "${AUTOINSTALL_CLEAN:-}" ]
then
echo "Cleaning $target"
rm -rf "$target"
fi