@@ -27,16 +27,16 @@ OMZ_DIR="${USER_HOME}/.oh-my-zsh"
2727ZSH_CUSTOM=" ${OMZ_DIR} /custom"
2828
2929# Feature options
30- : " ${installZsh := true} "
31- : " ${ohMyZsh := true} "
32- : " ${powerlevel10k := true} "
33- : " ${autosuggestions := true} "
34- : " ${syntaxHighlighting := true} "
35- : " ${opinionated := false} "
36- : " ${autosuggestHighlight := fg=8} "
37- : " ${zshrcUrl := } "
38- : " ${p10kUrl := } "
39- : " ${postInstallScriptUrl := } "
30+ : " ${INSTALLZSH := true} "
31+ : " ${OHMYZSH := true} "
32+ : " ${POWERLEVEL10K := true} "
33+ : " ${AUTOSUGGESTIONS := true} "
34+ : " ${SYNTAXHIGHLIGHTING := true} "
35+ : " ${OPINIONATED := false} "
36+ : " ${AUTOSUGGESTHIGHLIGHT := fg=8} "
37+ : " ${ZSHRCURL := } "
38+ : " ${P10KURL := } "
39+ : " ${POSTINSTALLSCRIPTURL := } "
4040
4141detect_package_manager () {
4242 if command -v apt-get & > /dev/null; then
@@ -150,7 +150,7 @@ install_autosuggestions() {
150150 su - " ${USERNAME} " -c " git clone https://github.com/zsh-users/zsh-autosuggestions '${plugin_dir} '"
151151 fi
152152 grep -qxF " source ${plugin_dir} /zsh-autosuggestions.zsh" " ${ZSHRC} " || echo " source ${plugin_dir} /zsh-autosuggestions.zsh" >> " ${ZSHRC} "
153- grep -qxF " ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='${autosuggestHighlight } '" " ${ZSHRC} " || echo " ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='${autosuggestHighlight } '" >> " ${ZSHRC} "
153+ grep -qxF " ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='${AUTOSUGGESTHIGHLIGHT } '" " ${ZSHRC} " || echo " ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='${AUTOSUGGESTHIGHLIGHT } '" >> " ${ZSHRC} "
154154}
155155
156156install_syntax_highlighting () {
@@ -171,18 +171,18 @@ apply_opinionated_files() {
171171 echo " > Applying opinionated config files..."
172172
173173 # Download custom .zshrc if provided
174- if [ -n " $zshrcUrl " ]; then
175- echo " Downloading custom .zshrc from $zshrcUrl "
176- curl -fsSL " $zshrcUrl " -o " ${USER_HOME} /.zshrc"
174+ if [ -n " $ZSHRCURL " ]; then
175+ echo " Downloading custom .zshrc from $ZSHRCURL "
176+ curl -fsSL " $ZSHRCURL " -o " ${USER_HOME} /.zshrc"
177177 chown " ${USERNAME} :${USERNAME} " " ${USER_HOME} /.zshrc"
178178 else
179179 echo " No custom .zshrc URL provided. Skipping."
180180 fi
181181
182182 # Download custom .p10k.zsh if provided
183- if [ -n " $p10kUrl " ]; then
184- echo " Downloading custom .p10k.zsh from $p10kUrl "
185- curl -fsSL " $p10kUrl " -o " ${USER_HOME} /.p10k.zsh"
183+ if [ -n " $P10KURL " ]; then
184+ echo " Downloading custom .p10k.zsh from $P10KURL "
185+ curl -fsSL " $P10KURL " -o " ${USER_HOME} /.p10k.zsh"
186186 chown " ${USERNAME} :${USERNAME} " " ${USER_HOME} /.p10k.zsh"
187187 else
188188 echo " No custom .p10k.zsh URL provided. Skipping."
@@ -193,9 +193,9 @@ apply_opinionated_files() {
193193}
194194
195195run_post_install_script () {
196- if [ -n " $postInstallScriptUrl " ]; then
197- echo " > Running custom post-install script from $postInstallScriptUrl "
198- curl -fsSL " $postInstallScriptUrl " | bash || echo " Warning: Failed to execute post-install script."
196+ if [ -n " $POSTINSTALLSCRIPTURL " ]; then
197+ echo " > Running custom post-install script from $POSTINSTALLSCRIPTURL "
198+ curl -fsSL " $POSTINSTALLSCRIPTURL " | bash || echo " Warning: Failed to execute post-install script."
199199 else
200200 echo " > No post-install script URL provided. Skipping."
201201 fi
@@ -205,27 +205,27 @@ run_post_install_script() {
205205
206206ensure_common_dependencies
207207
208- if [[ " ${installZsh } " == " true" ]]; then
208+ if [[ " ${INSTALLZSH } " == " true" ]]; then
209209 install_zsh
210210fi
211211
212- if [[ " ${installZsh } " == " true" && " ${ohMyZsh } " == " true" ]]; then
212+ if [[ " ${INSTALLZSH } " == " true" && " ${OHMYZSH } " == " true" ]]; then
213213 install_oh_my_zsh
214214fi
215215
216- if [[ " ${powerlevel10k } " == " true" && " ${ohMyZsh } " == " true" ]]; then
216+ if [[ " ${POWERLEVEL10K } " == " true" && " ${OHMYZSH } " == " true" ]]; then
217217 install_powerlevel10k
218218fi
219219
220- if [[ " ${autosuggestions } " == " true" && " ${ohMyZsh } " == " true" ]]; then
220+ if [[ " ${AUTOSUGGESTIONS } " == " true" && " ${OHMYZSH } " == " true" ]]; then
221221 install_autosuggestions
222222fi
223223
224- if [[ " ${syntaxHighlighting } " == " true" && " ${ohMyZsh } " == " true" ]]; then
224+ if [[ " ${SYNTAXHIGHLIGHTING } " == " true" && " ${OHMYZSH } " == " true" ]]; then
225225 install_syntax_highlighting
226226fi
227227
228- if [[ " ${opinionated } " == " true" ]]; then
228+ if [[ " ${OPINIONATED } " == " true" ]]; then
229229 apply_opinionated_files
230230fi
231231
0 commit comments