Created
August 4, 2015 15:24
-
-
Save twodayslate/0612f6340e6d422c2b99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Created by @bensge | |
cd DEBs | |
file=$(ls -t *.deb | head -1) | |
ssh user@server 'find /a/b/c/repofiles/ -name "*.deb" -exec rm -rf {} \;' | |
scp $file user@server:/a/b/c/repofiles/ | |
ssh user@server 'cd /a/b/c/repofiles/ && ./repofresh' | |
var=$(date +"%B_%d_%kh_%Mmin") | |
echo $1 >> "$var.txt" | |
scp "$var.txt" user@server:/a/b/c/repofiles/changelog/ | |
rm "$var.txt" | |
echo "$file" >> "latestVersion.txt" | |
ssh user@server 'find /a/b/c/repofiles/ -name "latestVersion.txt" -exec rm -rf {} \;' | |
scp "latestVersion.txt" user@server:/a/b/c/repofiles/ | |
rm "latestVersion.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment