diff options
author | Casper <me@skylarcloud.xyz> | 2024-12-18 15:21:28 -0700 |
---|---|---|
committer | Casper <me@skylarcloud.xyz> | 2024-12-18 15:21:28 -0700 |
commit | 1cb78494f3022fe9d808d070507bddf552c64753 (patch) | |
tree | 5c827daee442e211941bed7cc89decc95f8efbd7 /scripts/fetch-salt-from-emacs.sh |
Initial commit, new repo
Diffstat (limited to 'scripts/fetch-salt-from-emacs.sh')
-rw-r--r-- | scripts/fetch-salt-from-emacs.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/fetch-salt-from-emacs.sh b/scripts/fetch-salt-from-emacs.sh new file mode 100644 index 0000000..9e64de8 --- /dev/null +++ b/scripts/fetch-salt-from-emacs.sh @@ -0,0 +1,13 @@ +#!/usr/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi +qvm-run emacs-salt 'mv /home/user/Documents/salt-repo/.git /tmp/salt.git' +qvm-run emacs-salt 'cd /home/user/Documents && tar -cf /tmp/salt.tar salt-repo' +qvm-run emacs-salt 'mv /tmp/salt.git /home/user/Documents/salt-repo/.git' +qvm-run --pass-io emacs-salt 'cat /tmp/salt.tar' > /tmp/salt.tar && qvm-run emacs-salt 'rm /tmp/salt.tar' +rm -fr /root/user_salt.bak +mv /srv/user_salt /root/user_salt.bak +cd /tmp && tar -xf /tmp/salt.tar +mv /tmp/salt-repo /srv/user_salt |