diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-09 17:41:10 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-09 17:41:10 -0500 |
commit | 8747402d7647d02d85f513cdd9d32410a6e17db6 (patch) | |
tree | f75c5f4fcdcb010606b2068c6a47483a25b8bca4 /local | |
parent | 69ccbe77df34eabe6d909bea0aace445ff2ce7e8 (diff) | |
download | rcm-8747402d7647d02d85f513cdd9d32410a6e17db6.tar.gz rcm-8747402d7647d02d85f513cdd9d32410a6e17db6.tar.bz2 rcm-8747402d7647d02d85f513cdd9d32410a6e17db6.zip |
xsync; disallow root
Diffstat (limited to '')
-rwxr-xr-x | local/bin/xsync | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/local/bin/xsync b/local/bin/xsync index a298633..c6108ae 100755 --- a/local/bin/xsync +++ b/local/bin/xsync @@ -8,10 +8,14 @@ # Add whatever package you want to install, and run xsync to sync your # list of packages with the new list -set -e +usr=$(whoami) +if [ $usr = "root" ] + then echo "Xsync run as root; please do not run privileged" + exit 1 +fi xpkg -m | sort > /tmp/xsync-installed -cat ~/repository.list | sort > /tmp/xsync-spec +cat $HOME/repository.list | sort > /tmp/xsync-spec comm /tmp/xsync-spec /tmp/xsync-installed -23 > /tmp/xsync-to-install comm /tmp/xsync-spec /tmp/xsync-installed -13 > /tmp/xsync-to-remove |