Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • keegoid/quick-config
1 result
Show changes
Commits on Source (4)
Loading
@@ -55,15 +55,16 @@ qc_display_menu() {
Loading
@@ -55,15 +55,16 @@ qc_display_menu() {
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " M A I N - M E N U " echo " M A I N - M E N U "
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "1. APT PACKAGES & UPDATES" echo "1. APT PACKAGES & UPDATES"
echo "2. RUBY & RUBYGEMS VIA RBENV" echo "2. RUBY & RUBYGEMS VIA RBENV"
echo "3. NODEJS & NPMS VIA NVM" echo "3. NODEJS & NPMS VIA NVM"
echo "4. PYTHON PACKAGES VIA PIP" echo "4. PYTHON PACKAGES VIA PIP"
echo "5. KEYBASE" echo "5. SUBLIME TEXT 3"
echo "6. SYSTEM CONFIG" echo "6. KEYBASE"
echo "7. SSH KEY" echo "7. SYSTEM CONFIG"
echo "8. FIX PERMISSIONS" echo "8. SSH KEY"
echo "9. QUIT" echo "9. FIX PERMISSIONS"
echo "10. QUIT"
} }
   
# -------------------------- USER SELECTION # -------------------------- USER SELECTION
Loading
@@ -72,17 +73,18 @@ qc_select_options() {
Loading
@@ -72,17 +73,18 @@ qc_select_options() {
local choice local choice
# make sure we're always starting from the right place # make sure we're always starting from the right place
cd "$QC_DIR" || exit cd "$QC_DIR" || exit
read -rp "Enter choice [1 - 9]: " choice read -rp "Enter choice [1 - 10]: " choice
case $choice in case $choice in
1) lkm_run_script apts.sh "script";; 1) lkm_run_script apts.sh "script";;
2) lkm_run_script gems.sh "script";; 2) lkm_run_script gems.sh "script";;
3) lkm_run_script npms.sh "script";; 3) lkm_run_script npms.sh "script";;
4) lkm_run_script pips.sh "script";; 4) lkm_run_script pips.sh "script";;
5) lkm_run_script keybase.sh "script";; 5) lkm_run_script subl.sh "script";;
6) lkm_run_script config.sh "script";; 6) lkm_run_script keybase.sh "script";;
7) lkm_run_script sshkey.sh "script";; 7) lkm_run_script config.sh "script";;
8) qc_fix_permissions;; 8) lkm_run_script sshkey.sh "script";;
9) qc_exit_msg && exit 0;; 9) qc_fix_permissions;;
10) qc_exit_msg && exit 0;;
*) lkm_alert "Error..." && sleep 1 *) lkm_alert "Error..." && sleep 1
esac esac
   
Loading
Loading
Loading
@@ -74,23 +74,22 @@ qc_set_subl_config() {
Loading
@@ -74,23 +74,22 @@ qc_set_subl_config() {
local repo_url="$1" local repo_url="$1"
local conf_file="$CONF3" local conf_file="$CONF3"
local repo_file="$REPO3" local repo_file="$REPO3"
local conf_dir
local repo_dir local repo_dir
local cloned=1 local cloned=1
local user_dir="$HOME/.config/sublime-text-3/Packages/User" 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" "/") repo_dir=$(lkm_trim_shortest_right_pattern "$REPO3" "/")
   
# make sure directory exists for symlink # make sure directory exists for symlink
mkdir -p "$user_dir" mkdir -p "$user_dir"
   
# check User directory exists in QC_SYNCED/subl/User/, else move from $HOME/.config/sublime/User/ # check if $conf_dir exists, else create it and move $user_dir to $conf_dir
[ -d "$QC_SYNCED/subl/User" ] || { mkdir -p "$QC_SYNCED/subl/User" ; mv "$user_dir" "$QC_SYNCED/subl/User" ; } [ -d "$conf_dir" ] || { mkdir -p "$conf_dir" ; mv "$user_dir" "$conf_dir" ; }
   
# check if standard directory exists and if so, remove it # remove default user directory if not already a symlink
[ -d "$user_dir" ] && rm -r "$user_dir" [ -L "$user_dir" ] || { rm -r "$user_dir" ; ln -s "$conf_dir" "$user_dir" ; }
# symlink to User directory
ln -s "$QC_SYNCED/subl/User" "$user_dir"
   
# update or clone repository if symbolic link exists for User directory # update or clone repository if symbolic link exists for User directory
if [ -d "$repo_dir" ]; then if [ -d "$repo_dir" ]; then
Loading
Loading
Loading
@@ -29,6 +29,8 @@ qc_install_subl() {
Loading
@@ -29,6 +29,8 @@ qc_install_subl() {
else else
lkm_notify "subl is already installed" lkm_notify "subl is already installed"
fi fi
lkm_notify "Make sure to install Package Control so subl can install any packages listed in your User directory. It can be installed from https://packagecontrol.io/installation"
} }
   
# -------------------------- MAIN # -------------------------- MAIN
Loading
Loading