initial commit
This commit is contained in:
47
install.sh
Executable file
47
install.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )"
|
||||
|
||||
read -p "
|
||||
Would you like to use template from this repository as your .bashrc?
|
||||
WARNING: if you do, the existing ~/.bashrc will be deleted!
|
||||
[y/n]: " response
|
||||
|
||||
if [[ $response == [y,Y]* ]]
|
||||
then
|
||||
cp "$repo/.bashrc_template" "$HOME/.bashrc"
|
||||
echo 'Installed .bashrc'
|
||||
else
|
||||
echo 'Not installing .bashrc'
|
||||
fi
|
||||
|
||||
read -p "
|
||||
Would you like to include git options from this repo into ~/.gitconfig?
|
||||
[y/n]: " response
|
||||
|
||||
if [[ $response == [y,Y]* ]]
|
||||
then
|
||||
echo "[Include]
|
||||
path=$repo/.gitopts
|
||||
" >> "$HOME/.gitconfig"
|
||||
echo "Included git options into ~/.gitconfig"
|
||||
else
|
||||
echo "Not including git options into ~/.gitconfig"
|
||||
fi
|
||||
|
||||
for another_rc in \
|
||||
.inputrc \
|
||||
.screenrc
|
||||
do
|
||||
read -p "
|
||||
Would you like to use the $another_rc from this repo?
|
||||
WARNING: if you do, the existing ~/$another_rc will be deleted!
|
||||
[y/n]: " response
|
||||
|
||||
if [[ $response == [y,Y]* ]]
|
||||
then
|
||||
ln -sf "$repo/$another_rc" "$HOME/$another_rc"
|
||||
echo "Installed $another_rc"
|
||||
else
|
||||
echo "Not installing $another_rc"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user