summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rwxr-xr-xsh/getlogs30
-rwxr-xr-xsh/syncmusic10
-rwxr-xr-xsh/tmuxstartscript1
-rwxr-xr-xsh/w3msearch1
4 files changed, 26 insertions, 16 deletions
diff --git a/sh/getlogs b/sh/getlogs
index 349c5ac..d651fe5 100755
--- a/sh/getlogs
+++ b/sh/getlogs
@@ -1,25 +1,29 @@
-USER=AberrantFlux
-REMOTELOGDIR=zncu@aberrantflux.xyz:/home/zncu/.znc/moddata/log/$USER/
-LOGDIR=~/log/irc
+#!/bin/sh
+USER=LiCoO2
+REMOTELOGDIR="root@prestonpan.tech:/home/preston/.znc/users/$USER/networks/AndreiNet/moddata/log"
+LOGDIR=~/.local/share/log/irc
NETWORK=AndreiNet
-rsync -avzP --rsh=ssh $REMOTELOGDIR $LOGDIR/$USER
+rsync -avzP "$REMOTELOGDIR" "$LOGDIR/$USER"
echo "Logs available for:"
-echo
-for CHANNEL in $LOGDIR/$USER/$NETWORK/*
+echo ""
+
+for CHANNEL in $LOGDIR/$USER/log/*
do
- DATE=$(date -r $CHANNEL +"%Y-%m-%d %H:%M")
- NAME="$(basename $CHANNEL)"
- echo "$NAME - last edited $DATE"
+ NAME="$(basename "$CHANNEL")"
+ # DATE=$(date -r $CHANNEL +"%Y-%m-%d %H:%M")
+ echo "$NAME"
done
+
while :
do
CHANNELSELECTION=exit
- read -p "Enter the name of a channel to read the most recent log: [exit] " CHANNELSELECTION
+ printf "Enter the name of a channel to read the most recent log: [exit] "
+ read CHANNELSELECTION
CHANNELSELCTION="${CHANNELSELECTION:=exit}"
- if [ $CHANNELSELCTION = exit ];
+ if [ "$CHANNELSELCTION" = exit ];
then
break
fi
- LASTLOG="$(ls -t $LOGDIR/$USER/$NETWORK/$CHANNELSELECTION | head -n1)"
- less $LOGDIR/$USER/$NETWORK/$CHANNELSELECTION/$LASTLOG
+ LASTLOG="$(ls -t "$LOGDIR/$USER/log/$CHANNELSELECTION" | head -n1)"
+ less "$LOGDIR/$USER/log/$CHANNELSELECTION/$LASTLOG"
done
diff --git a/sh/syncmusic b/sh/syncmusic
index 84c7e5e..8cabaf1 100755
--- a/sh/syncmusic
+++ b/sh/syncmusic
@@ -1,15 +1,18 @@
+#!/bin/sh
REMOTEDIR=root@aberrantflux.xyz:/mnt/blockstorage/music
LOCALDIR=$(pwd)
echo "Remote directory is at $REMOTEDIR"
echo "Local dir is at $LOCALDIR"
echo "To sync from remote to local, enter d. To sync from local to remote, enter u. To cancel, enter c"
-read -p "Direction: " DIRECTION
+printf "Direction: "
+read DIRECTION
if [ $DIRECTION = d ]
then
COMMAND="rsync -avzP $REMOTEDIR/* $LOCALDIR/"
echo "About to run $COMMAND - enter y to continue, or n to cancel"
- read -p "Confirm: " CONFIRMATION
+ printf "Confirm: "
+ read CONFIRMATION
if [ $CONFIRMATION = y ]
then
rsync -avzP $REMOTEDIR/* $LOCALDIR/
@@ -20,7 +23,8 @@ if [ $DIRECTION = u ]
then
COMMAND="rsync -avzP $LOCALDIR/* $REMOTEDIR/"
echo "About to run $COMMAND - enter y to continue, or n to cancel"
- read -p "Confirm: " CONFIRMATION
+ printf "Confirm: "
+ read CONFIRMATION
if [ $CONFIRMATION = y ]
then
rsync -avzP $LOCALDIR/* $REMOTEDIR/
diff --git a/sh/tmuxstartscript b/sh/tmuxstartscript
index 12c6d3f..e0281ff 100755
--- a/sh/tmuxstartscript
+++ b/sh/tmuxstartscript
@@ -1,3 +1,4 @@
+#!/bin/sh
tmux new-session -d
sleep 0.05
tmux send-keys "cd ~ ; ls" C-m
diff --git a/sh/w3msearch b/sh/w3msearch
index bdb9a9c..e451c58 100755
--- a/sh/w3msearch
+++ b/sh/w3msearch
@@ -1 +1,2 @@
+#!/bin/sh
w3m www.google.com/search?q="$1"