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 (27)
# Quick Config # Quick Config
   
Quickly configures a fresh install of [Ubuntu 16.04.1 LTS 64-bit][xx] on a workstation. Quickly configures a fresh install of [Ubuntu 17.04 64-bit][zz] on a workstation.
   
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
   
- [What it can do](#what-it-can-do) - [What qc can do](#what-qc-can-do)
- [Installation](#installation)
- [Usage](#usage) - [Usage](#usage)
- [Clone or download this project](#clone-or-download-this-project)
- [Run it](#run-it)
- [SSH Keys](#ssh-keys)
- [License](#license) - [License](#license)
   
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
   
## What qc can do ## What qc can do
   
- update [Ubuntu][ubuntu] and install some programs using apt-get, gem, npm and pip - update [Ubuntu][ubuntu] and install some useful packages
- setup standard developement environment utilizing package managers: [rbenv][rbenv], [nvm][nvm], [virtualenv][venv]
- install gem, npm, and pip packages using appropriate package managers
- generate an [RSA key][sshkey] for remote [SSH sessions][ssh] - generate an [RSA key][sshkey] for remote [SSH sessions][ssh]
- add useful [shell aliases][sa]
- make the [terminal][gt] easier to read and use with: - make the [terminal][gt] easier to read and use with:
- colored prompts - colored prompt string (PS1)
- dark profile
- [autojump][aj] - [autojump][aj]
- [incremental history searching][ihs] - [incremental history searching][ihs]
- add [blackboard][bb] and [solarized][gsolar] color schemes to [gedit][gedit]
- add [solarized][msolar] color scheme to [Mutt][mutt] - add [solarized][msolar] color scheme to [Mutt][mutt]
- configure [tmux][tmux]
- install and configure [vim-gtk][vim] - install and configure [vim-gtk][vim]
- install and configure [Sublime Text][subl], it really is sublime for coding - install and configure [Sublime Text 3][subl]
- install [Keybase][keyb]
- configure [git][git] global settings - configure [git][git] global settings
- install the latest [VirtualBox][vb] and [Vagrant][vg] - fix ownership issues in Home directory (warning: dangerous command, run at your own risk)
- install [LXD][lxd], use it to download an [Ubuntu][xx] cloud image and create an [LXC][lxc] container
- install [ZFS][zfs] for use with [LXD][lxd]
- install [Juju][juju]
   
## Installation ## Installation
   
Loading
@@ -55,28 +49,21 @@ SEE: http://keegoid.mit-license.org
Loading
@@ -55,28 +49,21 @@ SEE: http://keegoid.mit-license.org
   
   
[ubuntu]: http://www.ubuntu.com/global [ubuntu]: http://www.ubuntu.com/global
[xx]: https://wiki.ubuntu.com/XenialXerus/ReleaseNotes [zz]: https://wiki.ubuntu.com/ZestyZapus/ReleaseNotes
[lxd]: https://linuxcontainers.org/lxd/introduction/
[lxc]: https://linuxcontainers.org/lxc/introduction/
[zfs]: https://wiki.ubuntu.com/ZFS
[juju]: http://www.ubuntu.com/cloud/juju
[gedit]: https://wiki.gnome.org/Apps/Gedit
[subl]: https://www.sublimetext.com/ [subl]: https://www.sublimetext.com/
[vim]: http://www.vim.org/ [vim]: http://www.vim.org/
[gt]: http://manpages.ubuntu.com/manpages/hardy/man1/gnome-terminal.1.html [gt]: http://manpages.ubuntu.com/manpages/hardy/man1/gnome-terminal.1.html
[ihs]: https://help.ubuntu.com/community/UsingTheTerminal#An_extremely_handy_tool_::_Incremental_history_searching [ihs]: https://help.ubuntu.com/community/UsingTheTerminal#An_extremely_handy_tool_::_Incremental_history_searching
[tsolar]: https://github.com/Anthony25/gnome-terminal-colors-solarized
[gsolar]: https://github.com/mattcan/solarized-gedit
[msolar]: https://github.com/altercation/mutt-colors-solarized [msolar]: https://github.com/altercation/mutt-colors-solarized
[bb]: https://github.com/afair/dot-gedit [bb]: https://github.com/afair/dot-gedit
[tmux]: https://tmux.github.io/
[mutt]: http://www.mutt.org/ [mutt]: http://www.mutt.org/
[vb]: https://www.virtualbox.org/ [keyb]: https://keybase.io/
[vg]: https://www.vagrantup.com/
[aj]: https://github.com/wting/autojump [aj]: https://github.com/wting/autojump
[ssh]: http://en.wikipedia.org/wiki/Secure_Shell [ssh]: http://en.wikipedia.org/wiki/Secure_Shell
[sshkey]: http://en.wikipedia.org/wiki/Ssh-keygen [sshkey]: http://en.wikipedia.org/wiki/Ssh-keygen
[sa]: http://en.wikipedia.org/wiki/Alias_%28command%29
[gh]: https://github.com/ [gh]: https://github.com/
[git]: https://git-scm.com/ [git]: https://git-scm.com/
[lp]: https://lastpass.com/f?3202156 [lp]: https://lastpass.com/f?3202156
[rbenv]: https://github.com/rbenv/rbenv
[nvm]: https://github.com/creationix/nvm
[venv]: https://github.com/pypa/virtualenv
Loading
@@ -19,6 +19,7 @@
Loading
@@ -19,6 +19,7 @@
   
# note: true=0 and false=1 in bash # note: true=0 and false=1 in bash
   
# shellcheck source=/dev/null
source colors.sh source colors.sh
   
# -------------------------- STRING MANIPULATION # -------------------------- STRING MANIPULATION
Loading
@@ -175,7 +176,7 @@ lkm_pause() {
Loading
@@ -175,7 +176,7 @@ lkm_pause() {
[ -z "${prompt}" ] && prompt="Press [Enter] key to continue" [ -z "${prompt}" ] && prompt="Press [Enter] key to continue"
# how to go back, with either default or user message # how to go back, with either default or user message
[ "$back" = true ] && prompt="${prompt}, [Ctrl+Z] to go back" [ "$back" = true ] && prompt="${prompt}, [Ctrl+Z] to go back"
read -p "$prompt..." read -rp "$prompt..."
} }
   
lkm_confirm() { lkm_confirm() {
Loading
@@ -381,7 +382,7 @@ lkm_install_gem() {
Loading
@@ -381,7 +382,7 @@ lkm_install_gem() {
for pkg in $names; do for pkg in $names; do
if ! gem list "$pkg" -i >/dev/null 2>&1; then if ! gem list "$pkg" -i >/dev/null 2>&1; then
echo echo
read -p "Press [Enter] to install $pkg..." read -rp "Press [Enter] to install $pkg..."
gem install "$pkg" gem install "$pkg"
fi fi
done done
Loading
@@ -399,7 +400,7 @@ lkm_install_npm() {
Loading
@@ -399,7 +400,7 @@ lkm_install_npm() {
for pkg in $names; do for pkg in $names; do
if ! npm ls -gs | grep -qw "$pkg"; then if ! npm ls -gs | grep -qw "$pkg"; then
echo echo
read -p "Press [Enter] to install $pkg..." read -rp "Press [Enter] to install $pkg..."
npm install -g "$pkg" npm install -g "$pkg"
fi fi
done done
Loading
@@ -419,7 +420,7 @@ lkm_install_pip() {
Loading
@@ -419,7 +420,7 @@ lkm_install_pip() {
pkg=$(lkm_trim_longest_right_pattern "$pkg" "[") pkg=$(lkm_trim_longest_right_pattern "$pkg" "[")
if ! pip list | grep "$pkg" >/dev/null 2>&1; then if ! pip list | grep "$pkg" >/dev/null 2>&1; then
echo echo
read -p "Press [Enter] to install $pkg..." read -rp "Press [Enter] to install $pkg..."
sudo -H pip install "$pkg" sudo -H pip install "$pkg"
fi fi
done done
Loading
@@ -443,7 +444,7 @@ lkm_gen_ssh_key() {
Loading
@@ -443,7 +444,7 @@ lkm_gen_ssh_key() {
else else
# create a new ssh key with provided ssh key comment # create a new ssh key with provided ssh key comment
lkm_pause "Press [Enter] to generate a new SSH key at: ${ssh_dir}/id_rsa" true lkm_pause "Press [Enter] to generate a new SSH key at: ${ssh_dir}/id_rsa" true
read -ep "Enter an ssh key comment: " -i 'coding key' comment read -rep "Enter an ssh key comment: " -i 'coding key' comment
ssh-keygen -b 4096 -t rsa -C "$comment" ssh-keygen -b 4096 -t rsa -C "$comment"
echo "SSH key generated" echo "SSH key generated"
chmod -c 0600 "${ssh_dir}/id_rsa" chmod -c 0600 "${ssh_dir}/id_rsa"
Loading
@@ -501,7 +502,7 @@ lkm_authorized_ssh_key() {
Loading
@@ -501,7 +502,7 @@ lkm_authorized_ssh_key() {
echo "*** NOTE ***" echo "*** NOTE ***"
echo "Paste (using ctrl+shift+v) your public ssh-rsa key from your workstation" echo "Paste (using ctrl+shift+v) your public ssh-rsa key from your workstation"
echo "to SSH into this server." echo "to SSH into this server."
read -ep "Paste it here: " ssh_rsa read -rep "Paste it here: " ssh_rsa
echo "${ssh_rsa}" > "${ssh_dir}/authorized_keys" echo "${ssh_rsa}" > "${ssh_dir}/authorized_keys"
echo "public SSH key saved to ${ssh_dir}/authorized_keys" echo "public SSH key saved to ${ssh_dir}/authorized_keys"
chmod -c 0600 "${ssh_dir}/authorized_keys" chmod -c 0600 "${ssh_dir}/authorized_keys"
Loading
Loading
Loading
@@ -4,7 +4,7 @@
Loading
@@ -4,7 +4,7 @@
   
echo "# --------------------------------------------" echo "# --------------------------------------------"
echo "# Quickly configures a fresh install of " echo "# Quickly configures a fresh install of "
echo "# Ubuntu 16.04 64-bit. " echo "# Ubuntu 17.04 64-bit. "
echo "# " echo "# "
echo "# Author : Keegan Mullaney " echo "# Author : Keegan Mullaney "
echo "# Website: keegoid.com " echo "# Website: keegoid.com "
Loading
@@ -27,10 +27,6 @@ QC_DEBUG_MODE=0
Loading
@@ -27,10 +27,6 @@ QC_DEBUG_MODE=0
# make sure $HOME variable is set # make sure $HOME variable is set
lkm_variable_set "$HOME" lkm_variable_set "$HOME"
   
# config for server
lkm_confirm "Is this a server?"
QC_IS_SERVER="$?"
# make sure curl and git are installed # make sure curl and git are installed
lkm_program_must_exist curl lkm_program_must_exist curl
lkm_program_must_exist git lkm_program_must_exist git
Loading
@@ -40,6 +36,7 @@ lkm_program_must_exist git
Loading
@@ -40,6 +36,7 @@ lkm_program_must_exist git
# if any files in home are not owned by home user, fix that # if any files in home are not owned by home user, fix that
qc_fix_permissions() { qc_fix_permissions() {
# set ownership # set ownership
lkm_notify2 "Warning: The following is a dangerous command, run at your own risk."
lkm_pause "Press [Enter] to make sure all files in $HOME are owned by $(whoami)" true lkm_pause "Press [Enter] to make sure all files in $HOME are owned by $(whoami)" true
sudo chown --preserve-root -cR "$(whoami)":"$(whoami)" "$HOME" sudo chown --preserve-root -cR "$(whoami)":"$(whoami)" "$HOME"
} }
Loading
@@ -57,26 +54,18 @@ qc_exit_msg() {
Loading
@@ -57,26 +54,18 @@ qc_exit_msg() {
qc_display_menu() { qc_display_menu() {
[ $QC_DEBUG_MODE -eq 1 ] || clear [ $QC_DEBUG_MODE -eq 1 ] || clear
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if [ $QC_IS_SERVER -eq 0 ]; then
echo " M A I N - M E N U "
echo " server "
else
echo " M A I N - M E N U " echo " M A I N - M E N U "
echo " workstation "
fi
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 & PIP VIA VIRTUALENV"
echo "5. SUBLIME TEXT" echo "5. SUBLIME TEXT 3"
echo "6. KEYBASE" echo "6. KEYBASE"
echo "7. SYSTEM CONFIG" echo "7. SYSTEM CONFIG"
echo "8. SSH KEY" echo "8. SSH KEY"
echo "9. VIRTUALBOX & VAGRANT" echo "9. FIX HOME OWNERSHIP"
echo "10. WORDPRESS WITH LXD, ZFS & JUJU" echo "10. QUIT"
echo "11. FIX PERMISSIONS"
echo "12. QUIT"
} }
   
# -------------------------- USER SELECTION # -------------------------- USER SELECTION
Loading
@@ -85,20 +74,18 @@ qc_select_options() {
Loading
@@ -85,20 +74,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 - 12]: " 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 subl.sh "script";; 5) lkm_run_script subl.sh "script";;
6) lkm_run_script keybase.sh "script";; 6) lkm_run_script keybase.sh "script";;
7) lkm_run_script config.sh "script";; 7) lkm_run_script config.sh "script";;
8) lkm_run_script sshkey.sh "script";; 8) lkm_run_script sshkey.sh "script";;
9) lkm_run_script vm.sh "script";; 9) qc_fix_permissions;;
10) lkm_run_script lxd.sh "script";; 10) qc_exit_msg && exit 0;;
11) qc_fix_permissions;;
12) qc_exit_msg && exit 0;;
*) lkm_alert "Error..." && sleep 1 *) lkm_alert "Error..." && sleep 1
esac esac
   
Loading
Loading
{
"folders":
[
{
"path": "."
}
]
}
Loading
@@ -103,26 +103,20 @@ fi
Loading
@@ -103,26 +103,20 @@ fi
   
# -------------------------- DEFAULT APT PACKAGES # -------------------------- DEFAULT APT PACKAGES
   
DEFAULT_SERVER_LIST='ca-certificates gettext-base less man-db openssh-server python-software-properties software-properites-common vim-gtk wget'
DEFAULT_WORKSTATION_LIST='autojump gpgv2 links mutt pinta x11vnc xclip vlc arp-scan' DEFAULT_WORKSTATION_LIST='autojump gpgv2 links mutt pinta x11vnc xclip vlc arp-scan'
DEFAULT_DEV_LIST='autoconf automake build-essential checkinstall dconf-cli shellcheck silversearcher-ag tidy xdotool vim-gtk' DEFAULT_DEV_LIST='autoconf automake build-essential checkinstall dconf-cli shellcheck silversearcher-ag tidy xdotool vim-gtk'
   
# -------------------------- PROMPT FOR PROGRAMS # -------------------------- PROMPT FOR PROGRAMS
   
if [ "$QC_IS_SERVER" -eq 0 ]; then lkm_notify3 "The following default packages can be modified prior to installation."
lkm_notify "Server packages to install (none to skip)" echo
read -ep " : " -i "$DEFAULT_SERVER_LIST" APTS1 echo "WORKSTATION"
else echo "DEVELOPER"
lkm_notify3 "The following default packages can be modified prior to installation." echo
echo lkm_notify "Workstation packages to install (delete all to skip)"
echo "WORKSTATION" read -rep " : " -i "$DEFAULT_WORKSTATION_LIST" APTS1
echo "DEVELOPER" lkm_notify "Developer packages to install"
echo read -rep " : " -i "$DEFAULT_DEV_LIST" APTS2
lkm_notify "Workstation packages to install (delete all to skip)"
read -ep " : " -i "$DEFAULT_WORKSTATION_LIST" APTS1
lkm_notify "Developer packages to install"
read -ep " : " -i "$DEFAULT_DEV_LIST" APTS2
fi
   
# -------------------------- ARRAY ASSIGNMENTS # -------------------------- ARRAY ASSIGNMENTS
   
Loading
Loading
Loading
@@ -14,22 +14,23 @@
Loading
@@ -14,22 +14,23 @@
   
[ -z "$QC_CONFIG" ] && QC_CONFIG="$HOME/.qc" [ -z "$QC_CONFIG" ] && QC_CONFIG="$HOME/.qc"
[ -z "$QC_BACKUP" ] && QC_BACKUP="$QC_CONFIG/backup" [ -z "$QC_BACKUP" ] && QC_BACKUP="$QC_CONFIG/backup"
[ -z "$QC_SYNCED" ] && read -ep "Directory to store/sync your config: " -i "$HOME/Dropbox/config" QC_SYNCED [ -z "$QC_SYNCED" ] && read -rep "Directory to store/sync Sublime Text config: " -i "$HOME/" QC_SYNCED
   
# system and program config files # system and program config files
CONF1="$HOME/.bashrc" CONF1="$HOME/.bashrc"
CONF2="$HOME/.inputrc" CONF2="$HOME/.inputrc"
CONF3="$QC_SYNCED/sublime/User/Preferences.sublime-settings" CONF3="$QC_SYNCED/subl/User/Preferences.sublime-settings"
CONF5="$HOME/.muttrc" CONF4="$HOME/.muttrc"
CONF6="$HOME/.vimrc" CONF5="$HOME/.vimrc"
CONF7="$HOME/.gitignore_global" CONF6="$HOME/.gitignore_global"
   
# config files copied from repositories # config files copied from repositories
REPO1="/usr/share/autojump/autojump.sh" REPO1="/usr/share/autojump/autojump.sh" #autojump.bash in CentOS
REPO3="$HOME/.config/sublime-text-3/Packages/Theme - KMS/subl.conf" REPO3="$QC_CONFIG/subl/subl.conf"
REPO5="$QC_CONFIG/mutt/colors/mutt-colors-solarized-dark-16.muttrc" REPO4="$QC_CONFIG/mutt/colors/mutt-colors-solarized-dark-16.muttrc"
REPO6="$QC_CONFIG/vim/vim.conf" REPO5="$QC_CONFIG/vim/vim.conf"
REPO7="$QC_CONFIG/git/gitignore_global" REPO6="$QC_CONFIG/git/gitignore_global"
REPO7="$QC_CONFIG/bashrc/ps1.conf"
   
# -------------------------- BACKUPS # -------------------------- BACKUPS
   
Loading
@@ -58,6 +59,15 @@ qc_do_backup() {
Loading
@@ -58,6 +59,15 @@ qc_do_backup() {
return 0 return 0
} }
   
# -------------------------- MORE SECURE LOGIN SCREEN
# sudo mkdir -p /etc/lightdm/lightdm.conf.d
# cat '[SeatDefaults] \
# user-session=ubuntu \
# greeter-show-manual-login=true \
# greeter-hide-users=true \
# allow-guest=false'
# -------------------------- SUBL CONFIG # -------------------------- SUBL CONFIG
   
# clone or pull git repo and copy repo files into proper places # clone or pull git repo and copy repo files into proper places
Loading
@@ -65,29 +75,37 @@ qc_set_subl_config() {
Loading
@@ -65,29 +75,37 @@ 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 conf_parent_dir
local repo_dir local repo_dir
local repo_name
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" "/")
conf_parent_dir=$(lkm_trim_shortest_right_pattern "$conf_dir" "/")
repo_dir=$(lkm_trim_shortest_right_pattern "$REPO3" "/") repo_dir=$(lkm_trim_shortest_right_pattern "$REPO3" "/")
repo_name=$(lkm_trim_longest_left_pattern "$repo_dir" "/")
   
# check if standard directory exists and if so, make a backup and remove it echo "conf_dir: $conf_dir"
[ -d "$user_dir" ] && { mv "$user_dir" "${user_dir}-bak"; rm -r "$user_dir"; } echo "conf_parent_dir: $conf_parent_dir"
echo "repo_dir: $repo_dir"
   
# make sure directories exist # make sure directory exists for symlink
mkdir -p "$HOME/.config/sublime-text-3/Packages" echo "attempting to make $user_dir"
mkdir -p "$QC_SYNCED/sublime/User" mkdir -p "$user_dir"
   
# symlink to User directory in Dropbox # check if $conf_dir exists, else create parent and move $user_dir to $conf_parent_dir
ln -s "$QC_SYNCED/sublime/User" "$user_dir" echo "checking if $conf_dir exists"
[ -d "$conf_dir" ] || { echo "making $conf_parent_dir" ; mkdir -p "$conf_parent_dir" ; echo "moving $user_dir to $conf_parent_dir" ; mv "$user_dir" "$conf_parent_dir" ; }
   
# update or clone repository # remove default user directory if not already a symlink
echo "checking for symlink at $user_dir"
[ -L "$user_dir" ] || { echo "creating 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 if [ -d "$repo_dir" ]; then
( (
cd "$repo_dir" || exit cd "$repo_dir" || exit
echo "checking for updates: $repo_name" echo "checking for updates: Keegoid's Sublime Text preferences"
git pull git pull
) )
else else
Loading
@@ -95,7 +113,8 @@ qc_set_subl_config() {
Loading
@@ -95,7 +113,8 @@ qc_set_subl_config() {
fi fi
   
# copy config file to proper location # copy config file to proper location
cp "$repo_file" "$conf_file" echo -e "copying $repo_file to \n$conf_file"
cp -i "$repo_file" "$conf_file"
if [ $? -eq 0 ] && [ "$cloned" -eq 0 ]; then if [ $? -eq 0 ] && [ "$cloned" -eq 0 ]; then
lkm_success "configured: $conf_file" lkm_success "configured: $conf_file"
fi fi
Loading
@@ -109,13 +128,13 @@ qc_set_subl_config() {
Loading
@@ -109,13 +128,13 @@ qc_set_subl_config() {
# clone or pull git repo and copy repo file onto conf file # clone or pull git repo and copy repo file onto conf file
qc_set_git_config() { qc_set_git_config() {
local repo_url="$1" local repo_url="$1"
local conf_file="$CONF7" local conf_file="$CONF6"
local repo_file="$REPO7" local repo_file="$REPO6"
local repo_dir local repo_dir
local repo_name local repo_name
local cloned=1 local cloned=1
   
repo_dir=$(lkm_trim_shortest_right_pattern "$REPO7" "/") repo_dir=$(lkm_trim_shortest_right_pattern "$REPO6" "/")
repo_name=$(lkm_trim_longest_left_pattern "$repo_dir" "/") repo_name=$(lkm_trim_longest_left_pattern "$repo_dir" "/")
   
# update or clone repository # update or clone repository
Loading
@@ -137,12 +156,18 @@ qc_set_git_config() {
Loading
@@ -137,12 +156,18 @@ qc_set_git_config() {
   
# check if git is already configured # check if git is already configured
if ! git config --list | grep -q "user.name"; then if ! git config --list | grep -q "user.name"; then
read -ep "your name for git commit logs: " -i 'Keegan Mullaney' real_name read -rep "your name for git commit logs: " -i 'Keegan Mullaney' real_name
read -ep "your email for git commit logs: " -i 'keeganmullaney@gmail.com' email_address read -rep "your email for git commit logs: " -i 'keeganmullaney@gmail.com' email_address
read -ep "your preferred text editor for git commits: " -i 'vi' git_editor read -rep "your preferred text editor for git commits: " -i 'subl --wait' git_editor
lkm_configure_git "$real_name" "$email_address" "$git_editor" && lkm_success "configured: $CONF7" lkm_configure_git "$real_name" "$email_address" "$git_editor" && lkm_success "configured: $CONF6"
fi fi
   
# todo:
# [diff]
# tool = default-difftool
# [difftool "default-difftool"]
# cmd = code --wait --diff $LOCAL $REMOTE
RET="$?" RET="$?"
lkm_debug lkm_debug
} }
Loading
@@ -170,33 +195,63 @@ EOF
Loading
@@ -170,33 +195,63 @@ EOF
lkm_debug lkm_debug
} }
   
# -------------------------- TERMINAL COLOR PROMPTS # -------------------------- AUTOJUMP (so awesome)
   
qc_set_terminal_color() { qc_set_autojump() {
local conf_file="$1" local conf_file="$1"
local src_cmd="$2"
   
if grep -q "#force_color_prompt=yes" "$conf_file" >/dev/null 2>&1; then if grep -q "autojump/autojump.sh" "$conf_file" >/dev/null 2>&1; then
lkm_pause "Press [Enter] to activate color terminal prompts" true echo "already added autojump (usage: j directory)"
sed -i.bak -e "/force_color_prompt=yes/ s/^# //" "$conf_file" && source "$conf_file" && lkm_success "configured: $conf_file with color terminal prompts"
else else
echo "already set color prompts" lkm_pause "Press [Enter] to configure autojump for gnome-terminal" true
# shellcheck disable=SC1090
echo -e "$src_cmd" >> "$conf_file" && source "$conf_file" && lkm_success "configured: $conf_file with autojump (usage: j directory)"
fi fi
   
# shellcheck disable=SC2034
RET="$?" RET="$?"
lkm_debug lkm_debug
} }
   
# -------------------------- AUTOJUMP (so awesome) # -------------------------- SET PS1
   
qc_set_autojump() { qc_set_ps1() {
local conf_file="$1" local repo_url="$1"
local src_cmd="$2" local src_cmd="$2"
local conf_file="$CONF1"
local repo_file="$REPO7"
local repo_dir
local repo_name
local configured=1
   
if grep -q "autojump/autojump.sh" "$conf_file" >/dev/null 2>&1; then repo_dir=$(lkm_trim_shortest_right_pattern "$REPO7" "/")
echo "already added autojump (usage: j directory)" repo_name=$(lkm_trim_longest_left_pattern "$repo_dir" "/")
# update or clone repository
if [ -d "$repo_dir" ]; then
(
cd "$repo_dir" || exit
echo "checking for updates: $repo_name"
git pull
)
else else
lkm_pause "Press [Enter] to configure autojump for gnome-terminal" true git clone "$repo_url" "$repo_dir"
echo -e "$src_cmd" >> "$conf_file" && source "$conf_file" && lkm_success "configured: $conf_file with autojump (usage: j directory)" fi
# check if already added, else set source command in conf_file
if grep -q "bashrc/ps1.conf" "$conf_file" >/dev/null 2>&1; then
echo "already added custom PS1 file"
else
lkm_pause "Press [Enter] to configure PS1 variable for gnome-terminal" true
# shellcheck disable=SC1090
sed -i.bak -e '0,/PS1/s//#PS1/' -e "/\"\$color_prompt\" = yes/ a $src_cmd" "$conf_file" && configured=0
fi
# success message
if [ $? -eq 0 ] && [ "$configured" -eq 0 ]; then
lkm_success "configured: $conf_file with custom PS1 variable"
echo "Close and reopen the terminal to see the new prompt string."
fi fi
   
# shellcheck disable=SC2034 # shellcheck disable=SC2034
Loading
@@ -208,14 +263,14 @@ qc_set_autojump() {
Loading
@@ -208,14 +263,14 @@ qc_set_autojump() {
   
# unset the various functions defined during execution of the script # unset the various functions defined during execution of the script
qc_reset() { qc_reset() {
unset -f qc_reset qc_do_backup qc_set_subl_config qc_set_git_config qc_set_terminal_history qc_set_autojump unset -f qc_reset qc_do_backup qc_set_code_config qc_set_git_config qc_set_terminal_history qc_set_autojump qc_set_ps1
} }
   
# -------------------------- MAIN # -------------------------- MAIN
   
lkm_pause "" true lkm_pause "" true
   
qc_do_backup "$CONF1 $CONF2 $CONF3 $CONF5 $CONF6 $CONF7" qc_do_backup "$CONF1 $CONF2 $CONF3 $CONF4 $CONF5 $CONF6"
   
# aliases (to practice terminal commands for Linux certification exams, I'm not using aliases at the moment) # aliases (to practice terminal commands for Linux certification exams, I'm not using aliases at the moment)
#lkm_set_sourced_config "https://gist.github.com/9d74e08779c1db6cb7b7" \ #lkm_set_sourced_config "https://gist.github.com/9d74e08779c1db6cb7b7" \
Loading
@@ -225,36 +280,31 @@ qc_do_backup "$CONF1 $CONF2 $CONF3 $CONF5 $CONF6 $CONF7"
Loading
@@ -225,36 +280,31 @@ qc_do_backup "$CONF1 $CONF2 $CONF3 $CONF5 $CONF6 $CONF7"
   
# mutt config # mutt config
lkm_set_sourced_config "https://github.com/altercation/mutt-colors-solarized.git" \ lkm_set_sourced_config "https://github.com/altercation/mutt-colors-solarized.git" \
"$CONF5" \ "$CONF4" \
"$REPO5" \ "$REPO4" \
"# source colorscheme file\nsource $REPO5\n\n# signature and alias files\nset signature=$QC_SYNCED/mutt/sig\nset alias_file=$QC_SYNCED/mutt/aliases\n\n# aliases are stored in their own file\nsource \"\$alias_file\"" "# source colorscheme file\nsource $REPO4\n\n# signature and alias files\nset signature=$QC_SYNCED/mutt/sig\nset alias_file=$QC_SYNCED/mutt/aliases\n\n# aliases are stored in their own file\nsource \"\$alias_file\""
   
# vim config # vim config
lkm_set_sourced_config "https://gist.github.com/00a60c7355c27c692262.git" \ lkm_set_sourced_config "https://gist.github.com/00a60c7355c27c692262.git" \
"$CONF6" \ "$CONF5" \
"$REPO6" \ "$REPO5" \
"\" source config file\n:so $REPO6\n\nset spellfile=$QC_SYNCED/vim/vim.utf-8.add\t\" spell check file to sync with other computers" "\" source config file\n:so $REPO5\n\nset spellfile=$QC_SYNCED/vim/vim.utf-8.add\t\" spell check file to sync with other computers"
[ -d "$QC_SYNCED/vim" ] || { mkdir -pv "$QC_SYNCED/vim"; lkm_notify3 "note: vim spellfile will be located in $QC_SYNCED/vim, you can change this in $CONF6"; }
   
# terminal profile (can't find profile file in new Ubuntu 16.04) [ -d "$QC_SYNCED/vim" ] || { mkdir -pv "$QC_SYNCED/vim"; lkm_notify3 "note: vim spellfile will be located in $QC_SYNCED/vim, you can change this in $CONF5"; }
#set_copied_config "https://gist.github.com/dad1663d2463db32c6e8.git" \
# "$HOME/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml" \
# "$QC_CONFIG/terminal/profile/gconf.xml"
   
# sublime text # sublime text 3
qc_set_subl_config "https://github.com/keegoid/kms-theme.git" qc_set_subl_config "https://gist.github.com/6628da9ad09cf0eff9427c6dfdca6e5f.git"
   
qc_set_git_config "https://gist.github.com/efa547b362910ac7077c.git" qc_set_git_config "https://gist.github.com/efa547b362910ac7077c.git"
   
qc_set_terminal_history "$CONF2" qc_set_terminal_history "$CONF2"
   
# already done in Ubuntu 16.04
#qc_set_terminal_color "$CONF1"
qc_set_autojump "$CONF1" \ qc_set_autojump "$CONF1" \
"\n# source autojump file\nif [ -f $REPO1 ]; then\n . $REPO1\nfi" "\n# source autojump file\nif [ -f $REPO1 ]; then\n . $REPO1\nfi"
   
qc_set_ps1 "https://gist.github.com/13482742b6140ec0ffbc818173805889.git" \
"# source PS1 file\n if [ -f $REPO7 ]; then\n . $REPO7\n fi"
qc_reset qc_reset
   
} # this ensures the entire script is downloaded # } # this ensures the entire script is downloaded #
Loading
@@ -32,7 +32,7 @@ qc_gem_check() {
Loading
@@ -32,7 +32,7 @@ qc_gem_check() {
for pkg in "${gem_check_list[@]}" for pkg in "${gem_check_list[@]}"
do do
if ~/.rbenv/shims/gem list ^"$pkg"$ -i >/dev/null 2>&1; then if ~/.rbenv/shims/gem list ^"$pkg"$ -i >/dev/null 2>&1; then
pkg_version=$(~/.rbenv/shims/gem list ^"$pkg"$ | grep "${pkg}" | cut -d " " -f 2 | cut -d "(" -f 2 | cut -d ")" -f 1) pkg_version=$(~/.rbenv/shims/gem list ^"$pkg"$ | grep "${pkg}" | cut -d' ' -f2 | cut -d'(' -f2 | cut -d')' -f1)
lkm_print_pkg_info "$pkg" "$pkg_version" lkm_print_pkg_info "$pkg" "$pkg_version"
else else
echo -e " ${YELLOW_BLACK} * $pkg [not installed] ${NONE_WHITE}" echo -e " ${YELLOW_BLACK} * $pkg [not installed] ${NONE_WHITE}"
Loading
@@ -84,7 +84,7 @@ qc_install_rbenv() {
Loading
@@ -84,7 +84,7 @@ qc_install_rbenv() {
'[[ ":$PATH:" =~ ":$HOME/.rbenv/bin:" ]] || PATH="$HOME/.rbenv/bin:$PATH"' '[[ ":$PATH:" =~ ":$HOME/.rbenv/bin:" ]] || PATH="$HOME/.rbenv/bin:$PATH"'
   
# optional, to speed up rbenv # optional, to speed up rbenv
[ -d "$HOME/.rbenv" ] && cd "$HOME/.rbenv" && src/configure && make -C src && cd - >/dev/null [ -d "$HOME/.rbenv" ] && cd "$HOME/.rbenv" && src/configure && make -C src && cd - >/dev/null
   
# add rbenv init - command to .bashrc and .bash_profile (for SublimeLinter) # add rbenv init - command to .bashrc and .bash_profile (for SublimeLinter)
# shellcheck disable=SC2016 # shellcheck disable=SC2016
Loading
@@ -124,7 +124,7 @@ qc_install_ruby() {
Loading
@@ -124,7 +124,7 @@ qc_install_ruby() {
# export MAKE=make # export MAKE=make
   
# install the latest stable ruby version # install the latest stable ruby version
ruby_global_v=$(~/.rbenv/bin/rbenv install --list | tr -d ' ' | grep "^2.*.[0..9]$" | tail -1) ruby_global_v=$(~/.rbenv/bin/rbenv install --list | tr -d ' ' | grep "^\w.\w.\w$" | tail -1)
[ $? -eq 0 ] && ~/.rbenv/bin/rbenv install "$ruby_global_v" [ $? -eq 0 ] && ~/.rbenv/bin/rbenv install "$ruby_global_v"
   
# set global ruby version # set global ruby version
Loading
@@ -165,7 +165,7 @@ echo
Loading
@@ -165,7 +165,7 @@ echo
echo "Rubygems" echo "Rubygems"
echo echo
lkm_notify "Packages to install with gem" lkm_notify "Packages to install with gem"
read -ep " : " -i 'bundler gist travis' GEMS read -rep " : " -i 'bundler gist travis' GEMS
   
# -------------------------- ARRAY ASSIGNMENTS # -------------------------- ARRAY ASSIGNMENTS
   
Loading
Loading
Loading
@@ -14,7 +14,7 @@
Loading
@@ -14,7 +14,7 @@
   
# -------------------------- SETUP PARAMETERS # -------------------------- SETUP PARAMETERS
   
[ -z "$QC_REPOS" ] && read -ep "Directory to use for repositories: ~/" -i "Dropbox/coding/repos" QC_REPOS [ -z "$QC_REPOS" ] && read -rep "Directory to use for repositories: ~/" -i "Dropbox/coding/repos" QC_REPOS
QC_SELECTED_CONTAINER QC_SELECTED_CONTAINER
   
# -------------------------- INSTALL LXD/LXC # -------------------------- INSTALL LXD/LXC
Loading
@@ -45,7 +45,7 @@ qc_init_juju_lxd() {
Loading
@@ -45,7 +45,7 @@ qc_init_juju_lxd() {
[ $? -eq 0 ] && sudo lxd init [ $? -eq 0 ] && sudo lxd init
   
# set compression and turn off dedup # set compression and turn off dedup
read -ep "Enter the name you used for your zpool: " zpool_name read -rep "Enter the name you used for your zpool: " zpool_name
sudo zfs set compression=on "$zpool_name" sudo zfs set compression=on "$zpool_name"
sudo zfs set compression=lz4 "$zpool_name" sudo zfs set compression=lz4 "$zpool_name"
sudo zfs set dedup=off "$zpool_name" sudo zfs set dedup=off "$zpool_name"
Loading
@@ -97,7 +97,7 @@ qc_import_lxd_image() {
Loading
@@ -97,7 +97,7 @@ qc_import_lxd_image() {
# $1 -> host name # $1 -> host name
qc_set_hosts() { qc_set_hosts() {
lxc list lxc list
read -ep "Type an existing container name to use for ${1}: " QC_SELECTED_CONTAINER read -rep "Type an existing container name to use for ${1}: " QC_SELECTED_CONTAINER
   
# add container's ip to /etc/hosts # add container's ip to /etc/hosts
lkm_pause "Press [Enter] to add $1 to /etc/hosts" lkm_pause "Press [Enter] to add $1 to /etc/hosts"
Loading
@@ -134,8 +134,8 @@ qc_set_hosts() {
Loading
@@ -134,8 +134,8 @@ qc_set_hosts() {
# $1 -> host name # $1 -> host name
qc_set_shared_directory() { qc_set_shared_directory() {
# set syncing directory paths # set syncing directory paths
read -ep "Choose a source directory on host to sync: ~/${QC_REPOS}/" -i "${1}/site" relative_source read -rep "Choose a source directory on host to sync: ~/${QC_REPOS}/" -i "${1}/site" relative_source
read -ep "Choose a target directory in container to sync: /" -i "var/www/${1}/public_html" target_dir read -rep "Choose a target directory in container to sync: /" -i "var/www/${1}/public_html" target_dir
source_dir="$HOME/${QC_REPOS}/$relative_source" source_dir="$HOME/${QC_REPOS}/$relative_source"
target_dir="/${target_dir}" target_dir="/${target_dir}"
   
Loading
@@ -185,8 +185,8 @@ qc_create_lxd_container() {
Loading
@@ -185,8 +185,8 @@ qc_create_lxd_container() {
   
# select an image and choose a container name # select an image and choose a container name
lxc image list lxc image list
read -ep "Select an image to use for the new container: " -i 'ubuntu-trusty' selected_image read -rep "Select an image to use for the new container: " -i 'ubuntu-trusty' selected_image
read -ep "Enter a host name to use with /etc/hosts: " -i 'wordpress.dev' host_name read -rep "Enter a host name to use with /etc/hosts: " -i 'wordpress.dev' host_name
   
# create and start container # create and start container
lxc launch "$selected_image" lxc launch "$selected_image"
Loading
@@ -221,7 +221,7 @@ qc_deploy_wordpress() {
Loading
@@ -221,7 +221,7 @@ qc_deploy_wordpress() {
   
# optionally set wp-content to git repository # optionally set wp-content to git repository
lkm_confirm "Use a git repository for wp-content?" true lkm_confirm "Use a git repository for wp-content?" true
[ $? -eq 0 ] && lkm_notify3 "Format: git@host:path/repo.git or http://host/path/repo.git" && read -ep "Enter a git repository: " git_repo && juju set wordpress wp-content="$git_repo" [ $? -eq 0 ] && lkm_notify3 "Format: git@host:path/repo.git or http://host/path/repo.git" && read -rep "Enter a git repository: " git_repo && juju set wordpress wp-content="$git_repo"
   
RET="$?" RET="$?"
lkm_debug lkm_debug
Loading
Loading
Loading
@@ -15,9 +15,7 @@
Loading
@@ -15,9 +15,7 @@
{ # this ensures the entire script is downloaded # { # this ensures the entire script is downloaded #
   
# -------------------------- SETUP PARAMETERS # -------------------------- SETUP PARAMETERS
[ -z "$NVM_V" ] && read -rep "NVM version to use: " -i "0.33.2" NVM_V
[ -z "$QC_LTS" ] && QC_LTS=4
[ -z "$NVM_V" ] && NVM_V=0.31.1
   
# -------------------------- MISSING PROGRAM CHECKS # -------------------------- MISSING PROGRAM CHECKS
   
Loading
@@ -31,34 +29,29 @@ npm_check_list=()
Loading
@@ -31,34 +29,29 @@ npm_check_list=()
   
# install the long term support version of Node.js via NVM # install the long term support version of Node.js via NVM
qc_nvm() { qc_nvm() {
local node_v
# install NVM # install NVM
curl -o- "https://raw.githubusercontent.com/creationix/nvm/v${NVM_V}/install.sh" | bash curl -o- "https://raw.githubusercontent.com/creationix/nvm/v${NVM_V}/install.sh" | bash
   
# source nvm # source nvm
# shellcheck source=/dev/null
. ~/.nvm/nvm.sh . ~/.nvm/nvm.sh
   
# make sure nvm is installed # install latest long term support version
lkm_has nvm || lkm_error "nvm install failed" nvm install --lts=Boron
# get long term support version
node_v=$(nvm ls-remote | grep "v${QC_LTS}.*" | tail -1 | tr -d ' ')
# install nodejs
nvm install "$node_v"
   
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
nvm alias default "$node_v" # check which node and npm
fi echo "checking which node"
which node
# check which node and npm echo "checking which npm"
which node which npm
which npm
   
# check npm version # check npm version
npm -v echo "checking npm version"
npm -v
   
lkm_notify "After switching node versions, remember to run \`npm build\`." lkm_notify "After switching node versions, remember to run \`npm build\`."
fi
   
RET="$?" RET="$?"
lkm_debug lkm_debug
Loading
@@ -118,7 +111,7 @@ echo
Loading
@@ -118,7 +111,7 @@ echo
echo "NODE.JS" echo "NODE.JS"
echo echo
lkm_notify "Packages to install with npm" lkm_notify "Packages to install with npm"
read -ep " : " -i 'bower browser-sync coffee-script csslint doctoc gulp npm-check-updates remark remark-lint' NPMS read -rep " : " -i 'bower browser-sync coffee-script csslint doctoc gulp npm-check-updates remark remark-lint' NPMS
   
# -------------------------- ARRAY ASSIGNMENTS # -------------------------- ARRAY ASSIGNMENTS
   
Loading
Loading
Loading
@@ -43,6 +43,7 @@ qc_virtualenv() {
Loading
@@ -43,6 +43,7 @@ qc_virtualenv() {
lkm_set_source_cmd "$HOME/.bashrc" \ lkm_set_source_cmd "$HOME/.bashrc" \
'virtualenv/bin:' \ 'virtualenv/bin:' \
'[[ ":$PATH:" =~ ":$HOME/.virtualenv/bin:" ]] || PATH="$HOME/.virtualenv/bin:$PATH"' '[[ ":$PATH:" =~ ":$HOME/.virtualenv/bin:" ]] || PATH="$HOME/.virtualenv/bin:$PATH"'
# shellcheck source=/dev/null
source ~/.bashrc source ~/.bashrc
   
# check which pip # check which pip
Loading
@@ -151,10 +152,10 @@ echo
Loading
@@ -151,10 +152,10 @@ echo
echo "PIPs" echo "PIPs"
echo echo
lkm_notify "Packages to install with pip" lkm_notify "Packages to install with pip"
read -ep " : " -i 'jrnl[encrypted] pyflakes python-slugify keyrings.alt' PIPS read -rep " : " -i 'jrnl[encrypted] pyflakes python-slugify keyrings.alt' PIPS
# lkm_notify "Packages to install with pip3" # lkm_notify "Packages to install with pip3"
# shellcheck disable=SC2034 # shellcheck disable=SC2034
# read -ep " : " -i 'pep8' PIP3S # read -rep " : " -i 'pep8' PIP3S
   
# -------------------------- ARRAY ASSIGNMENTS # -------------------------- ARRAY ASSIGNMENTS
   
Loading
@@ -172,6 +173,8 @@ qc_reset() {
Loading
@@ -172,6 +173,8 @@ qc_reset() {
# -------------------------- INSTALL PROGRAMS # -------------------------- INSTALL PROGRAMS
   
lkm_confirm "Install PIP via Virtualenv?" true lkm_confirm "Install PIP via Virtualenv?" true
# check if virtualenv and pip are already installed
[ -f ~/.virtualenv/bin/pip ] && lkm_confirm "Looks like Virtualenv and PIP are already installed. Proceed anyway?" true
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
qc_virtualenv qc_virtualenv
echo "Close the terminal window and reopen to enable the new PIP with Virtualenv. Then rerun this script." echo "Close the terminal window and reopen to enable the new PIP with Virtualenv. Then rerun this script."
Loading
Loading
Loading
@@ -23,8 +23,8 @@ qc_set_authorized_key() {
Loading
@@ -23,8 +23,8 @@ qc_set_authorized_key() {
sudo chmod a-w /etc/ssh/sshd_config.original sudo chmod a-w /etc/ssh/sshd_config.original
   
# client allive interval # client allive interval
read -ep "Enter the client alive interval in seconds to prevent SSH from dropping out: " -i "60" client_alive read -rep "Enter the client alive interval in seconds to prevent SSH from dropping out: " -i "60" client_alive
read -ep "Enter the ssh port number to use on the server: " -i "22" ssh_port read -rep "Enter the ssh port number to use on the server: " -i "22" ssh_port
   
# edit /etc/ssh/sshd_config # edit /etc/ssh/sshd_config
sudo sed -i.bak -e "{ s/#Port 22/Port $ssh_port/ sudo sed -i.bak -e "{ s/#Port 22/Port $ssh_port/
Loading
@@ -60,12 +60,6 @@ qc_set_authorized_key() {
Loading
@@ -60,12 +60,6 @@ qc_set_authorized_key() {
   
# -------------------------- MAIN # -------------------------- MAIN
   
if [ "$QC_IS_SERVER" -eq 0 ]; then lkm_gen_ssh_key "$HOME/.ssh" "$(whoami)"
qc_set_authorized_key
else
lkm_gen_ssh_key "$HOME/.ssh" "$(whoami)"
fi
unset -f qc_set_authorized_key
   
} # this ensures the entire script is downloaded # } # this ensures the entire script is downloaded #
Loading
@@ -14,7 +14,8 @@
Loading
@@ -14,7 +14,8 @@
   
# install Sublime Text # install Sublime Text
qc_install_subl() { qc_install_subl() {
local subl_v='3126' local subl_v
[ -z "$subl_v" ] && read -rep "Sublime Text 3 version to use: " -i "3126" subl_v
local subl_url="https://download.sublimetext.com/sublime-text_build-${subl_v}_amd64.deb" local subl_url="https://download.sublimetext.com/sublime-text_build-${subl_v}_amd64.deb"
   
if lkm_not_installed "subl"; then if lkm_not_installed "subl"; then
Loading
@@ -29,6 +30,9 @@ qc_install_subl() {
Loading
@@ -29,6 +30,9 @@ 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"
lkm_notify2 "Recommend installing the Material Theme package for Sublime Text 3 from https://github.com/equinusocio/material-theme"
} }
   
# -------------------------- MAIN # -------------------------- MAIN
Loading
Loading
#!/bin/bash
# --------------------------------------------
# Install or update virtual machine apps.
#
# Author : Keegan Mullaney
# Website: keegoid.com
# Email : keeganmullaney@gmail.com
# License: keegoid.mit-license.org
# --------------------------------------------
{ # this ensures the entire script is downloaded #
# -------------------------- MAIN
lkm_confirm "install Virtualbox?" true
[ $? -eq 0 ] && lkm_install_apt virtualbox
lkm_confirm "install Vagrant?" true
[ $? -eq 0 ] && lkm_install_apt vagrant
} # this ensures the entire script is downloaded #