Skip to content

Instantly share code, notes, and snippets.

@tytydraco
Last active September 17, 2020 04:02
Show Gist options
  • Save tytydraco/9646be559a9fac02b2e6aa1a1a99faaf to your computer and use it in GitHub Desktop.
Save tytydraco/9646be559a9fac02b2e6aa1a1a99faaf to your computer and use it in GitHub Desktop.
Setup ChArch for Linux machines in /usr/bin/.
#!/bin/bash
# Written by Draco (tytydraco) @ GitHub
# Check for root permissions
if [[ `id -u` -ne 0 ]]
then
echo "[!] No root permissions. Exiting."
exit 1
fi
echo "[*] Navigating to temp location"
cd /tmp
echo "[*] Fetching latest ChArch repository"
wget https://github.com/tytydraco/ChArch/archive/master.zip
echo "[*] Unzipping"
unzip master.zip
echo "[*] Adding execute privileges"
chmod +x ChArch-master/bin/*
echo "[*] Removing any existing ChArch binaries"
rm -rf /usr/local/bin/charch /usr/local/bin/cparch /usr/local/bin/lsarch /usr/local/bin/mkarch /usr/local/bin/rmarch /usr/local/bin/unarch
echo "[*] Adding ChArch binaries"
cp ChArch-master/bin/* /usr/local/bin/
echo "[*] Cleaning up"
rm -rf ChArch-master master.zip
echo "[*] Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment