Skip to content

Instantly share code, notes, and snippets.

@forkbombe
Created July 26, 2016 12:45
Show Gist options
  • Save forkbombe/9c4899001665a3e0812337e1e0f2ec22 to your computer and use it in GitHub Desktop.
Save forkbombe/9c4899001665a3e0812337e1e0f2ec22 to your computer and use it in GitHub Desktop.
A basic bash install executable script
#!/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