tadd various fixes - scripts - random scripts [h|git clone git://parazyd.org/scripts.git|URL:git://parazyd.org/scripts.git|server|port] [1|Log|/git/scripts/log.gph|server|port] [1|Files|/git/scripts/files.gph|server|port] [1|Refs|/git/scripts/refs.gph|server|port] --- [1|commit d65759220b6b5d3b81f573dbf50f476ad5007069|/git/scripts/commit/d65759220b6b5d3b81f573dbf50f476ad5007069.gph|server|port] [1|parent 102d035f011a9b5ba859d8fff179545bf636a43e|/git/scripts/commit/102d035f011a9b5ba859d8fff179545bf636a43e.gph|server|port] [h|Author: parazyd |URL:mailto:parazyd@dyne.org|server|port] Date: Wed, 20 Jul 2016 19:37:02 +0200 add various fixes Diffstat: M addrepo.sh | 4 ++-- M autoup | 1 + M dn | 22 ++++++++++++---------- M obsolete/scream.sh | 4 ++-- M ys | 4 ++-- 5 files changed, 19 insertions(+), 16 deletions(-) --- [1|diff --git a/addrepo.sh b/addrepo.sh|/git/scripts/file/addrepo.sh.gph|server|port] t@@ -8,11 +8,11 @@ GITOLITE="/home/parazyd/devel/gitolite-admin" reponame="$1" repodesc="$2" repoowner=`awk '/name =/ {print $3}' ~/.gitconfig` -[[ -n $3 ]] && repoowner="$3" +[ -n "$3" ] && repoowner="$3" writeconf() { - if [[ $repodesc == "unlisted" || $repodesc == "private" ]]; then + if [ "$repodesc" == "unlisted" || $repodesc == "private" ]; then cat < /etc/resolv.conf && chattr on - exit 0;; + chattr off && echo "nameserver 127.0.0.1 # out" > /etc/resolv.conf && chattr on;; home|h) stopd - chattr off && echo "nameserver 10.0.1.1 # home" > /etc/resolv.conf && chattr on - exit 0;; - bridge) + chattr off && echo "nameserver 10.0.1.1 # home" > /etc/resolv.conf && chattr on;; + bridge|b) stopd - chattr off && echo "nameserver 172.16.17.1 # bridge" > /etc/resolv.conf && chattr on - exit 0;; + chattr off && echo "nameserver 172.16.17.1 # bridge" > /etc/resolv.conf && chattr on;; + jabba) + stopd + chattr off && echo "nameserver 192.168.43.1 # jabba" > /etc/resolv.conf && chattr on;; + goog|g) + stopd + chattr off && echo "nameserver 8.8.8.8 # google" > /etc/resolv.conf && chattr on;; *) echo "current set as: `awk '{print $4}' /etc/resolv.conf`" - echo "usage: `basename $0` {home|out}";; + echo "usage: `basename $0` {home|out}" + exit 1;; esac - -exit 1 [1|diff --git a/obsolete/scream.sh b/obsolete/scream.sh|/git/scripts/file/obsolete/scream.sh.gph|server|port] t@@ -3,8 +3,8 @@ POSIT=/sys/devices/platform/hdaps/position while true; do - val1=`cat $POSIT | awk -F, '{print $1}' | sed 's/(//'` - val2=`cat $POSIT | awk -F, '{print $2}' | sed 's/)//'` + val1=`awk -F, '{print $1}' $POSIT | sed 's/(//'` + val2=`awk -F, '{print $2}' $POSIT | sed 's/)//'` while [[ $val1 -lt '-370' && $val1 -gt '-375' ]]; do echo "AHAHHAHAA!!" [1|diff --git a/ys b/ys|/git/scripts/file/ys.gph|server|port] t@@ -15,9 +15,9 @@ usage() { EOF } -num=3 +num=5 regex='^.*]*>\([^<]*\).*$' -output='\2 - http://youtube.com\1' +output='\2 - https://youtube.com\1' while getopts "hn:tu" OPT; do case $OPT in