|
|
@@ -1,9 +1,15 @@
|
|
|
#!/bin/bash
|
|
|
# Quick Script to setup terminal environment
|
|
|
|
|
|
+if [ $# -ne 1 ]; then
|
|
|
+ echo "Usage: $0 <prompt to use: seafly|parrot|powerline>"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
host=$(hostname)
|
|
|
hostname="${host^^}"
|
|
|
repo_directory="/opt/qconfig"
|
|
|
+user_prompt="$1"
|
|
|
|
|
|
# Set Permissions
|
|
|
chmod 660 $(find ./ -type f)
|
|
|
@@ -22,11 +28,9 @@ function add_string_to_file() {
|
|
|
}
|
|
|
|
|
|
# Bashrc
|
|
|
-add_string_to_file "$HOME/.bashrc" "# Setup Aliases"
|
|
|
add_string_to_file "$HOME/.bashrc" "source $HOME/dots/default_aliases"
|
|
|
-add_string_to_file "$HOME/.bashrc" "source $HOME/dots/seafly-prompt"
|
|
|
+add_string_to_file "$HOME/.bashrc" "source $HOME/dots/$user_prompt-prompt"
|
|
|
|
|
|
-add_string_to_file "$HOME/.bashrc" "# Scripts"
|
|
|
add_string_to_file "$HOME/.bashrc" "bash $HOME/dots/life.sh 1993-07-21 control"
|
|
|
|
|
|
# NVIM
|
|
|
@@ -40,25 +44,21 @@ cp "./tmux.conf" "$HOME/.tmux.conf"
|
|
|
# PATH VARS
|
|
|
if [ -f "$HOME/.dots/user_paths" ]; then
|
|
|
chmod 660 "$HOME/.dots/user_paths"
|
|
|
- add_string_to_file "$HOME/.bashrc" "# PATH FILE"
|
|
|
add_string_to_file "$HOME/.bashrc" "source $HOME/.dots/user_paths"
|
|
|
fi
|
|
|
|
|
|
if [ -f "$HOME/.dots/user_aliases" ]; then
|
|
|
chmod 660 "$HOME/.dots/user_aliases"
|
|
|
- add_string_to_file "$HOME/.bashrc" "# USER ALIASES"
|
|
|
add_string_to_file "$HOME/.bashrc" "source $HOME/.dots/user_aliases"
|
|
|
fi
|
|
|
|
|
|
if [ -f "$repo_directory/user_paths" ]; then
|
|
|
chmod 660 "$repo_directory/user_paths"
|
|
|
- add_string_to_file "$HOME/.bashrc" "# PATH FILE"
|
|
|
add_string_to_file "$HOME/.bashrc" "source $repo_directory/user_paths"
|
|
|
fi
|
|
|
|
|
|
if [ -f "$repo_directory/user_aliases" ]; then
|
|
|
chmod 660 "$repo_directory/user_aliases"
|
|
|
- add_string_to_file "$HOME/.bashrc" "# USER ALIASES"
|
|
|
add_string_to_file "$HOME/.bashrc" "source $repo_directory/user_aliases"
|
|
|
fi
|
|
|
|