Skip to content
Snippets Groups Projects
Commit 5572a718 authored by Keegan Mullaney's avatar Keegan Mullaney
Browse files

minor improvements

parent 92c8ef54
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -55,15 +55,15 @@ qc_display_menu() {
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " M A I N - M E N U "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "1. APT PACKAGES & UPDATES"
echo "2. RUBY & RUBYGEMS VIA RBENV"
echo "3. NODEJS & NPMS VIA NVM"
echo "4. PYTHON PACKAGES VIA PIP"
echo "5. SUBLIME TEXT 3"
echo "6. KEYBASE"
echo "7. SYSTEM CONFIG"
echo "8. SSH KEY"
echo "9. FIX PERMISSIONS"
echo "1. APT PACKAGES & UPDATES"
echo "2. RUBY & RUBYGEMS VIA RBENV"
echo "3. NODEJS & NPMS VIA NVM"
echo "4. PYTHON PACKAGES VIA PIP"
echo "5. SUBLIME TEXT 3"
echo "6. KEYBASE"
echo "7. SYSTEM CONFIG"
echo "8. SSH KEY"
echo "9. FIX PERMISSIONS"
echo "10. QUIT"
}
 
Loading
Loading
Loading
Loading
@@ -74,23 +74,25 @@ qc_set_subl_config() {
local repo_url="$1"
local conf_file="$CONF3"
local repo_file="$REPO3"
local conf_dir
local repo_dir
local cloned=1
local user_dir="$HOME/.config/sublime-text-3/Packages/User"
 
conf_dir=$(lkm_trim_shortest_right_pattern "$CONF3" "/")
repo_dir=$(lkm_trim_shortest_right_pattern "$REPO3" "/")
 
# make sure directory exists for symlink
mkdir -p "$user_dir"
 
# check User directory exists in QC_SYNCED/subl/User/, else move from $HOME/.config/sublime/User/
[ -d "$QC_SYNCED/subl/User" ] || { mkdir -p "$QC_SYNCED/subl/User" ; mv "$user_dir" "$QC_SYNCED/subl/User" ; }
# check if $conf_dir exists, else create it and move $user_dir to $conf_dir
[ -d "$conf_dir" ] || { mkdir -p "$conf_dir" ; mv "$user_dir" "$conf_dir" ; }
 
# check if standard directory exists and if so, remove it
[ -d "$user_dir" ] && rm -r "$user_dir"
# remove default user directory if not already a symlink
[ -L "$user_dir" ] || rm -r "$user_dir"
 
# symlink to User directory
ln -s "$QC_SYNCED/subl/User" "$user_dir"
# symlink from user_dir to conf_dir
ln -s "$conf_dir" "$user_dir"
 
# update or clone repository if symbolic link exists for User directory
if [ -d "$repo_dir" ]; then
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment