diff options
author | EuAndreh <eu@euandre.org> | 2022-11-12 07:33:36 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-12 07:33:36 -0300 |
commit | 908ab441cc95d7ac657bf285dbe63a4c270ec841 (patch) | |
tree | 28052fc41a99c13e0abd4f1fe0dbb84b87ded29e | |
parent | Move email, IRC and Atom into Thunderbird (diff) | |
download | dotfiles-908ab441cc95d7ac657bf285dbe63a4c270ec841.tar.gz dotfiles-908ab441cc95d7ac657bf285dbe63a4c270ec841.tar.xz |
bin/bins: Add -F option
-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: |