Add installation script
This commit is contained in:
12
install.sh
Executable file
12
install.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
|
||||
if grep -q -e 'source\s+.*/linux-workspace/bashrc\s*$' $HOME/.bashrc; then
|
||||
echo "Linux Workspace configuration already exists in .bashrc !"
|
||||
exit 1
|
||||
else
|
||||
readonly SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
|
||||
echo "Adding to $HOME/.bashrc"
|
||||
echo "source '$SCRIPT_DIR/bashrc'" >> "$HOME/.bashrc"
|
||||
fi
|
||||
Reference in New Issue
Block a user