summaryrefslogtreecommitdiff
path: root/scripts/push-salt-to-emacs.sh
diff options
context:
space:
mode:
authorCasper <me@skylarcloud.xyz>2024-12-18 15:21:28 -0700
committerCasper <me@skylarcloud.xyz>2024-12-18 15:21:28 -0700
commit1cb78494f3022fe9d808d070507bddf552c64753 (patch)
tree5c827daee442e211941bed7cc89decc95f8efbd7 /scripts/push-salt-to-emacs.sh
Initial commit, new repo
Diffstat (limited to 'scripts/push-salt-to-emacs.sh')
-rwxr-xr-xscripts/push-salt-to-emacs.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/push-salt-to-emacs.sh b/scripts/push-salt-to-emacs.sh
new file mode 100755
index 0000000..c9e6bba
--- /dev/null
+++ b/scripts/push-salt-to-emacs.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+if [ "$EUID" -ne 0 ]
+ then echo "Please run as root"
+ exit
+fi
+qvm-copy-to-vm emacs-salt /srv/user_salt
+qvm-run emacs-salt 'mv /home/user/Documents/salt-repo/.git /tmp/salt.git'
+qvm-run emacs-salt 'rm -fr /home/user/Documents/salt-repo/*'
+qvm-run emacs-salt 'mv /tmp/salt.git /home/user/Documents/salt-repo/.git'
+qvm-run emacs-salt 'mv /home/user/QubesIncoming/dom0/user_salt/* /home/user/Documents/salt-repo/'
+qvm-run emacs-salt 'rm -fr /home/user/QubesIncoming/dom0/user_salt'