autostart-manage/autoinstall/before.sh

21 lines
296 B
Bash
Raw Permalink Normal View History

2024-01-09 15:48:11 +00:00
#!/usr/bin/env bash
if [ "${action:?}" = "run" ]
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