From: Francois Fleuret Date: Wed, 17 Feb 2021 21:13:00 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=5da30a8f8b2d003b73588a5ad03afda8777f5d94;p=scripts.git Update. --- diff --git a/bashrc b/bashrc index d16c2ca..f50d7cc 100644 --- a/bashrc +++ b/bashrc @@ -140,8 +140,12 @@ function ext () { find . -maxdepth 1 -type f | \grep \. | sed -e 's/^.*\.\([^/.]*\)$/\1/' } -function obs () { - dir=${HOME}/misc/use-by-$(date --date='+3 months' +%Y-%b-%d) +# function catscan () { + # convert signal-attachment-2020-06-01-192843.jpeg signal-attachment-2020-06-01-192829.jpeg -quality 25 -sigmoidal-contrast 10,45% -page a4 scan.pdf +# } + +function trash-later () { + dir=${HOME}/misc/trash-later/remove-after-$(date --date='+3 months' +%Y-%b-%d) mkdir -p "${dir}" pushd "${dir}" } @@ -444,15 +448,16 @@ alias a='cd /tmp/at' function trash () { - [[ "${TRASH_ROOT}" ]] || TRASH_ROOT="${HOME}/.trash" + [[ "${TRASH_LATER_ROOT}" ]] || TRASH_LATER_ROOT="${HOME}/.trash" if [[ "$1" == "--" ]] then shift - elif [[ "$1" == "-t" ]] + elif [[ "$1" == "-l" ]] then shift - TRASH_DIR="${TRASH_ROOT}" + echo "Trashin in 3 months" + TRASH_DIR="${TRASH_LATER_ROOT}/remove-after-$(date --date='+3 months' +%Y-%b-%d)" mkdir -p "${TRASH_DIR}" else TRASH_DIR=$(date +/tmp/trash-${USER}-%Y-%b-%d-%Hh) @@ -543,7 +548,7 @@ function netup () { return 0 fi - if \ifconfig -s | grep -q -v ^'(Iface|lo) ' + if \ifconfig -s | grep -q -v ^'(Iface|lo|docker[0-9]) ' then echo "There is/are already interface(s) up." >&2 return 1