From c6923edc556014ef60f282ecffe5098b3f9f7fec Mon Sep 17 00:00:00 2001 From: Stephen Cochrane Date: Fri, 9 Oct 2020 22:11:14 +0200 Subject: [PATCH] Tidy up --- Makefile | 2 +- miscfiles/scripts/binary | 7 ------ miscfiles/scripts/bip | 12 --------- miscfiles/scripts/picbin | 54 ---------------------------------------- 4 files changed, 1 insertion(+), 74 deletions(-) delete mode 100755 miscfiles/scripts/binary delete mode 100755 miscfiles/scripts/bip delete mode 100755 miscfiles/scripts/picbin diff --git a/Makefile b/Makefile index 85a9e2d..c3ab4aa 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ submods: setupbin: [ ! -d ~/bin ] && git clone https://github.com/skippy404/bin $$HOME/bin || echo "bin already exists" mkdir -p ~/bin/local - cp $(DIR)/miscfiles/scripts/* ~/bin + cp $(DIR)/miscfiles/scripts/* ~/bin/local/ -rm -f ~/bin/local/upd # We need to custom build this # Sets up custom updating script based on install location diff --git a/miscfiles/scripts/binary b/miscfiles/scripts/binary deleted file mode 100755 index 66bc1dc..0000000 --- a/miscfiles/scripts/binary +++ /dev/null @@ -1,7 +0,0 @@ -toBinary(){ - local n bit - for (( n=$1 ; n>0 ; n >>= 1 )); do bit="$(( n&1 ))$bit"; done - printf "%s\n" "$bit" -} - -toBinary $1 diff --git a/miscfiles/scripts/bip b/miscfiles/scripts/bip deleted file mode 100755 index 43945f7..0000000 --- a/miscfiles/scripts/bip +++ /dev/null @@ -1,12 +0,0 @@ -toBinary(){ - local n bit - for (( n=$1 ; n>0 ; n >>= 1 )); do bit="$(( n&1 ))$bit"; done - printf "%s\n" "$bit" -} - -addr1=$(echo $1 | cut -d "." -f 1) -addr2=$(echo $1 | cut -d "." -f 2) -addr3=$(echo $1 | cut -d "." -f 3) -addr4=$(echo $1 | cut -d "." -f 4) - -echo $(toBinary $addr1)"."$(toBinary $addr2)"."$(toBinary $addr3)"."$(toBinary $addr4) diff --git a/miscfiles/scripts/picbin b/miscfiles/scripts/picbin deleted file mode 100755 index af335c5..0000000 --- a/miscfiles/scripts/picbin +++ /dev/null @@ -1,54 +0,0 @@ -#/bin/bash -# @Auther Stephen Cochrane -# github: skippy404 -set -e - -usage () { - echo " picbin [options]" - echo "Args:" - echo "h: Shows this message." - echo "l: shows the link to the file in a dialog box" - echo "p: path to the file" - exit $1 -} - -while getopts "hp:l" opt -do - case $opt in - h) - usage 0 - ;; - p) - path="$OPTARG" - ;; - l) - link=1 - ;; - *) - exit 2 - ;; - esac -done - -if [ $path ] -then - [ 0 -eq $# ] && usage 1 - [[ ! -f $path ]] && usage 1 -else - gnome-screenshot -f /tmp/picbin.png - path="/tmp/picbin.png" -fi - -abort() { - echo "Aborting upload of $path" - exit 0 -} - -zenity --question --text="Confirm upload." -[ ! $? ] && abort - -echo "Uploading -> $path" - -url=$(curl -F"file=@$path" https://0x0.st) -echo $url -[ $link ] && zenity --info --window-icon="info" --text="$url" || exit 0 -- 2.45.2