diff --git a/setup/apps/setup.zsh b/setup/apps/setup.zsh new file mode 100644 index 0000000..c66178e --- /dev/null +++ b/setup/apps/setup.zsh @@ -0,0 +1,28 @@ +APPS__PACKAGE_DIR="$HOME/.packages" + +function SETUP__APPS() { + STATUS 'starting application source-build installs' + + APPS__SIMPLE_INSTALL 'https://github.com/tiyn/dmenu' 'patched-dmenu' +} + + +function APPS__SIMPLE_INSTALL() { + [ ! -d $APPS__PACKAGE_DIR ] && mkdir $APPS__PACKAGE_DIR + + local TARGET="$1" + local NAME="$2" + local LOCAL_BUILD="$APPS_PACKAGE_DIR/$NAME" + + CHECK "Downloading $NAME" + git clone $TARGET $LOCAL_BUILD >>$LOG 2>&1 \ + && { OK; cd $LOCAL_BUILD; } || { WARN; return 1; } + + CHECK "Building $NAME" + make clean >>$LOG 2>&1 \ + && OK || { WARN; return 2; } + + CHECK "Installing $NAME" + sudo make install >>$LOG 2>&1 \ + && OK || { WARN; return 3; } +} diff --git a/setup/aws/setup.zsh b/setup/aws/setup.zsh index 95250f0..3d5c547 100644 --- a/setup/aws/setup.zsh +++ b/setup/aws/setup.zsh @@ -1,4 +1,4 @@ -AWS__SETUP() { +function SETUP__AWS() { STATUS 'starting aws setup' "$DOTWRYN_PATH/bin/aws/configure" diff --git a/setup/config/setup.zsh b/setup/config/setup.zsh index eb7c137..a294dfe 100644 --- a/setup/config/setup.zsh +++ b/setup/config/setup.zsh @@ -1,4 +1,4 @@ -CONFIG__SETUP() { +function SETUP__CONFIG() { ############################################################################################ # Friendly Name ~/.config/THE_REST .wryn/config/THE_REST (if different) CONFIG__SYMLINK 'compton' 'compton/compton.conf' diff --git a/setup/linux b/setup/linux index 730d87f..f416a2e 100755 --- a/setup/linux +++ b/setup/linux @@ -116,9 +116,10 @@ MAKE_REQUIRED_DIRECTORY_STRUCTURE() { ################################################################################ source "$DOTWRYN_PATH/setup/os-dependencies/setup.zsh" +source "$DOTWRYN_PATH/setup/config/setup.zsh" source "$DOTWRYN_PATH/setup/zsh/setup.zsh" source "$DOTWRYN_PATH/setup/vim/setup.zsh" -source "$DOTWRYN_PATH/setup/config/setup.zsh" +source "$DOTWRYN_PATH/setup/apps/setup.zsh" source "$DOTWRYN_PATH/setup/aws/setup.zsh" ################################################################################ @@ -130,14 +131,15 @@ source "$DOTWRYN_PATH/setup/aws/setup.zsh" INIT GET_SUDO_PASSWORD -OS_DEPENDENCY__SETUP || FATAL 'user abort' +SETUP__OS_DEPENDENCY || FATAL 'user abort' MAKE_REQUIRED_DIRECTORY_STRUCTURE -CONFIG__SETUP || ERROR=1 +SETUP__CONFIG || ERROR=1 -ZSH__SETUP || ERROR=2 -VIM__SETUP || ERROR=3 -AWS__SETUP || ERROR=4 +SETUP__ZSH || ERROR=2 +SETUP__VIM || ERROR=3 +SETUP__APPS || ERROR=4 +SETUP__AWS || ERROR=5 CLEANUP $ERROR diff --git a/setup/os-dependencies/setup.zsh b/setup/os-dependencies/setup.zsh index e970c6b..ccea4d8 100644 --- a/setup/os-dependencies/setup.zsh +++ b/setup/os-dependencies/setup.zsh @@ -8,7 +8,7 @@ source "$DOTWRYN_PATH/setup/os-dependencies/arch.zsh" && DEPENDENCY_DIR="$DOTWRYN_PATH/setup/os-dependencies" \ || DEPENDENCY_DIR="${0:a:h}" -function OS_DEPENDENCY__SETUP() { +function SETUP__OS_DEPENDENCY() { local ERROR=0 STATUS 'checking os dependencies' diff --git a/setup/vim/setup.zsh b/setup/vim/setup.zsh index e5a80f4..dc4500b 100644 --- a/setup/vim/setup.zsh +++ b/setup/vim/setup.zsh @@ -2,7 +2,7 @@ source "$DOTWRYN_PATH/setup/vim/compile-from-source.zsh" ##################################################################### -function VIM__SETUP() { +function SETUP__VIM() { STATUS 'starting vim setup' VIM__COMPILE_FROM_SOURCE VIM__SOURCE_RC diff --git a/setup/zsh/setup.zsh b/setup/zsh/setup.zsh index 6d91054..65f918e 100644 --- a/setup/zsh/setup.zsh +++ b/setup/zsh/setup.zsh @@ -1,6 +1,6 @@ ##################################################################### -function ZSH__SETUP() { +function SETUP__ZSH() { ZSH__SET_DEFAULT_SHELL ZSH__SOURCE_RC }