From: Francois Fleuret Date: Sun, 19 Dec 2010 10:44:49 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ec5d5f4a0a407340f44e06e5b187053782a0470;p=scripts.git Cosmetics. --- diff --git a/bashrc b/bashrc index a2f7987..f264e2c 100644 --- a/bashrc +++ b/bashrc @@ -189,20 +189,20 @@ function cdt () { alias t='cd /tmp' function trash () { - TRASH=$(find /tmp/ -maxdepth 1 -mmin -15 -type d -name "trash-*" | sort | tail -1) + TRASH=$(date +/tmp/trash-%Y-%b-%d-%Hh) - if [[ ${TRASH} ]]; then + if [[ -d ${TRASH} ]]; then echo "Re-use ${TRASH}" else - TRASH=$(date +/tmp/trash-%Y-%b-%d-%H_%M_%S) mkdir ${TRASH} - echo "Created ${TRASH}:" + echo "Created ${TRASH}" fi mv "$@" ${TRASH} + echo "Trashed $@" } -alias trash=trash.sh +# alias trash=trash.sh function mmsget () { mplayer $1 -dumpstream -dumpfile $(basename $1) diff --git a/hotspot.sh b/hotspot.sh index adcebb9..a8a27ae 100755 --- a/hotspot.sh +++ b/hotspot.sh @@ -17,7 +17,10 @@ # Contact for comments & bug reports # ######################################################################### -INTERFACE=wlan0 +INTERFACE=${WIFI_INTERFACE} + +[[ ${INTERFACE} ]] || INTERFACE=wlan0 + MTU=512 SCAN_OUTPUT=$(mktemp /tmp/scanresult.XXXXXX) diff --git a/trash.sh b/trash.sh index 30faa3a..550b574 100755 --- a/trash.sh +++ b/trash.sh @@ -22,7 +22,7 @@ set -e # Move things to a newly created trash directory in /tmp/. Re-use an # existing one if it is less than 5min old. -TRASH=$(find /tmp/ -maxdepth 1 -mmin -5 -type d -name "trash*" | sort | tail -1) +TRASH=$(find /tmp/ -maxdepth 1 -mmin -15 -type d -name "trash*" | sort | tail -1) if [[ ${TRASH} ]]; then echo "Re-use ${TRASH}"