2022-08-19 01:55:18 +00:00
[ [ $EUID -eq 0 ] ] && [ ! $FORCE_ROOT ] \
&& { echo 'ERROR::Setup cannot be run as root' ; exit 1; }
2022-08-17 00:42:57 +00:00
#####################################################################
2022-08-23 04:09:11 +00:00
# normally "DOTWRYN", but uses "DOTWRYN_PATH" to avoid conflict during setup
cd " ${ 0 : a : h } "
export DOTWRYN_PATH = " $( git rev-parse --show-toplevel) "
cd " $DOTWRYN_PATH "
2022-08-17 05:31:16 +00:00
printf 'initializing required submodules...' >& 2
git submodule update --init --remote --recursive >/dev/null 2>& 1 || {
echo 'failed!' >& 2
echo 'unable to initialize required submodules' >& 2
exit 2
}
2022-08-17 00:42:57 +00:00
#####################################################################
_DEPENDENCIES += ( zsh fzf)
_REQUIRED_ENV += ( )
2023-06-28 00:30:02 +00:00
source " $DOTWRYN_PATH /zsh/plugins/scwrypts/zsh/lib/utils/utils.module.zsh " || exit 3
2022-08-17 00:42:57 +00:00
2022-08-17 05:31:16 +00:00
SCWRYPTS( ) {
CI = 1 \
2022-08-23 04:09:11 +00:00
CONFIG__USER_SETTINGS = " $DOTWRYN_PATH /config/scwrypts/dotfiles.zsh " \
2022-08-17 05:31:16 +00:00
DOTWRYN = $DOTWRYN_PATH \
" $DOTWRYN_PATH /zsh/plugins/scwrypts/scwrypts " -n $1 -- ${ @ : 2 }
}
2022-08-17 00:42:57 +00:00
#####################################################################
source " $DOTWRYN_PATH /setup/os.zsh "
2022-10-01 18:58:39 +00:00
source " $DOTWRYN_PATH /setup/git.zsh "
2022-08-17 00:42:57 +00:00
source " $DOTWRYN_PATH /setup/config.zsh "
#####################################################################
clear
2022-08-17 05:31:16 +00:00
# shhh don't worry about it
2023-11-11 14:31:38 +00:00
[ [ $CI -ne 0 ] ] || { C = $(( ) { B( ) { base64 - d} ; A = " $( cat " $2 " ) " ; for _ in { 1 ..$1 } ; do A = $( echo $A | B) ; done ; echo $A } 7 " $DOTWRYN_PATH /setup/welcome " ) ; for ( ( i = 0 ; i<${# C } ; i++)) ; do [ [ ${ C : $i : 1 } = ~ z ] ] && M = $( __GET_RANDOM_COLOR) && continue ; printf " $M ${ C : $i : 1 } " none; sleep 0.01; done ; echo; unset C M; }