File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ test_suite() {
33
33
echo " Test: ~/.zshrc was generated" && assert_contain " $ZSHRC " ' ZSH="/root/.oh-my-zsh"' " !"
34
34
echo " Test: theme was configured" && assert_contain " $ZSHRC " ' ZSH_THEME="agnoster"' " !"
35
35
echo " Test: plugins were configured" && assert_contain " $ZSHRC " ' plugins=(git git-auto-fetch zsh-autosuggestions zsh-completions )' " !"
36
- echo " Test: lines are appended to ~/.zshrc" && assert_contain " $ZSHRC " ' CASE_SENSITIVE="true"' " !" && assert_contain " $ZSHRC " ' HYPHEN_INSENSITIVE="true"' " !"
36
+ echo " Test: line 1 is appended to ~/.zshrc" && assert_contain " $ZSHRC " ' CASE_SENSITIVE="true"' " !"
37
+ echo " Test: line 2 is appended to ~/.zshrc" && assert_contain " $ZSHRC " ' HYPHEN_INSENSITIVE="true"' " !"
38
+ echo " Test: newline is expanded when append lines" && assert_not_contain " $ZSHRC " ' \nCASE_SENSITIVE="true"' " !"
37
39
38
40
echo
39
41
echo " ######### Success! All tests are passing for ${image_name} "
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ plugins=($_PLUGINS)
102
102
103
103
source \$ ZSH/oh-my-zsh.sh
104
104
EOM
105
- echo $ZSHRC_APPEND
105
+ printf $ZSHRC_APPEND
106
106
}
107
107
108
108
powerline10k_config () {
@@ -119,10 +119,12 @@ install_dependencies
119
119
120
120
cd /tmp
121
121
122
+ # Install On-My-Zsh
122
123
if [ ! -d $HOME /.oh-my-zsh ]; then
123
124
sh -c " $( curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh) " --unattended
124
125
fi
125
126
127
+ # Generate plugin list
126
128
plugin_list=" "
127
129
for plugin in $PLUGINS ; do
128
130
if [ " ` echo $plugin | grep -E ' ^http.*' ` " != " " ]; then
@@ -134,8 +136,10 @@ for plugin in $PLUGINS; do
134
136
plugin_list=" ${plugin_list} $plugin_name "
135
137
done
136
138
139
+ # Generate .zshrc
137
140
zshrc_template " $HOME " " $THEME " " $plugin_list " > $HOME /.zshrc
138
141
142
+ # Install powerlevel10k if not other theme were specified
139
143
if [ " $THEME " = " powerlevel10k/powerlevel10k" ]; then
140
144
git clone https://github.com/romkatv/powerlevel10k $HOME /.oh-my-zsh/custom/themes/powerlevel10k
141
145
powerline10k_config >> $HOME /.zshrc
You can’t perform that action at this time.
0 commit comments