diff options
-rwxr-xr-x | bin/bins | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -4,7 +4,7 @@ set -eu usage() { cat <<-'EOF' Usage: - bins + bins [-F] bins -h EOF } @@ -13,6 +13,7 @@ help() { cat <<-'EOF' Options: + -F force remove the cache file -h, --help show this message @@ -45,8 +46,12 @@ for flag in "$@"; do esac done -while getopts 'h' flag; do +FORCE=false +while getopts 'Fh' flag; do case "$flag" in + F) + FORCE=true + ;; h) usage help @@ -62,6 +67,9 @@ shift $((OPTIND- 1)) F="$XDG_CACHE_HOME/euandreh/bins" +if [ "$FORCE" = true ]; then + rm -f "$F" +fi IFS=: # Word-splitting is the goal: |