mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 21:18:36 -06:00
Compare commits
2 commits
78f0643183
...
31210178f8
Author | SHA1 | Date | |
---|---|---|---|
31210178f8 | |||
8563d1c423 |
4 changed files with 20 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
![Number of scripts](https://img.shields.io/badge/number_of_scripts-40-blue)
|
![Number of scripts](https://img.shields.io/badge/number_of_scripts-43-blue)
|
||||||
# Random Scripts
|
# Random Scripts
|
||||||
This repository is for random scripts I wrote mostly for personal use.
|
This repository is for random scripts I wrote mostly for personal use.
|
||||||
|
|
||||||
|
|
7
get-remote-tmp-clipboard
Normal file
7
get-remote-tmp-clipboard
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script should be used in conjunction with tmp-clipboard
|
||||||
|
# You need to pass a hostname to this script as an argument, and the script
|
||||||
|
# will pull the text saved by the remote machine's tmp-clipboard script
|
||||||
|
|
||||||
|
ssh $* 'cat /tmp/.tmp-clipboard; >$_' | wl-copy
|
|
@ -73,6 +73,11 @@ HMDIR="/mnt/storage/sintan"
|
||||||
BKDIR="server-rsync:/mnt/storage"
|
BKDIR="server-rsync:/mnt/storage"
|
||||||
LGDIR="/home/sintan"
|
LGDIR="/home/sintan"
|
||||||
|
|
||||||
|
if ! $(ping server-ts -nqc 1 -W 1 >/dev/null 2>&1); then
|
||||||
|
echo "Remote machine not available. Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo $(date) "| Pulling pkglists_server to HDD..." | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
echo $(date) "| Pulling pkglists_server to HDD..." | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
||||||
rsync -aAXH --delete --stats "$BKDIR/Documents/Backup/pkglists_server/" "$HMDIR/Documents/Backup/pkglists_server/" | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
rsync -aAXH --delete --stats "$BKDIR/Documents/Backup/pkglists_server/" "$HMDIR/Documents/Backup/pkglists_server/" | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
||||||
echo $'\n'$(date) "| Done!" | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
echo $'\n'$(date) "| Done!" | tee -a "$LGDIR/TempStorage/impfilesbk.log"
|
||||||
|
|
7
tmp-clipboard
Normal file
7
tmp-clipboard
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script just puts the piped text to a temp file
|
||||||
|
# Using the get-remote-tmp-clipboard script, we can retrieve it from another machine.
|
||||||
|
|
||||||
|
cat >/tmp/.tmp-clipboard
|
||||||
|
|
Loading…
Reference in a new issue