Created
July 26, 2016 12:45
-
-
Save forkbombe/9c4899001665a3e0812337e1e0f2ec22 to your computer and use it in GitHub Desktop.
A basic bash install executable script
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 | |
cd /tmp | |
## Get the executable | |
wget https://path/to/bin | |
## Make home for command | |
mkdir ~/bin | |
## Copy executable to command directory | |
cp /tmp/[bin] ~/bin/[command] | |
## Allow run executable | |
chmod +x ~/bin/[command] | |
## Export command path to .bashrc to allow for command | |
echo "export PATH=$PATH:~/bin" >> ~/.bashrc | |
## Reload .bashrc | |
. ~/.bashrc | |
## Remove downloaded executable from /tmp | |
rm -f /tmp/[bin] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment