Bob Mottram 8 年 前
コミット
4286f536d0
共有1 個のファイルを変更した14 個の追加14 個の削除を含む
  1. 14
    14
      src/freedombone-utils-gnusocialtools

+ 14
- 14
src/freedombone-utils-gnusocialtools ファイルの表示

@@ -161,33 +161,33 @@ function install_pleroma {
161 161
     background_url="$3"
162 162
     title="$4"
163 163
 
164
-    if [ ! -d ~/build/pleroma ]; then
164
+    if [ ! -d $INSTALL_DIR/pleroma ]; then
165 165
         function_check git_clone
166
-        git_clone $PLEROMA_REPO ~/build/pleroma
167
-        if [ ! -d ~/build/pleroma ]; then
166
+        git_clone $PLEROMA_REPO $INSTALL_DIR/pleroma
167
+        if [ ! -d $INSTALL_DIR/pleroma ]; then
168 168
             echo $'Unable to clone pleroma repo'
169 169
             exit 682252
170 170
         fi
171 171
     fi
172 172
 
173
-    cd ~/build/pleroma
173
+    cd $INSTALL_DIR/pleroma
174 174
     git checkout $PLEROMA_COMMIT -b $PLEROMA_COMMIT
175 175
     set_completion_param "${app_name} pleroma commit" "$PLEROMA_COMMIT"
176 176
 
177 177
     npm install -g yarn
178 178
     yarn
179 179
     npm run build
180
-    if [ ! -d ~/build/pleroma/dist ]; then
180
+    if [ ! -d $INSTALL_DIR/pleroma/dist ]; then
181 181
         echo 'Unable to build pleroma'
182 182
         exit 7629352
183 183
     fi
184
-    if [ ! -f ~/build/pleroma/dist/index.html ]; then
184
+    if [ ! -f $INSTALL_DIR/pleroma/dist/index.html ]; then
185 185
         echo $'Unable to build pleroma index.html'
186 186
         exit 5282682
187 187
     fi
188 188
 
189
-    mv ~/build/pleroma/dist/index.html ~/build/pleroma/dist/pleroma.html
190
-    cp -r ~/build/pleroma/dist/* /var/www/${pleroma_domain}/htdocs/
189
+    mv $INSTALL_DIR/pleroma/dist/index.html $INSTALL_DIR/pleroma/dist/pleroma.html
190
+    cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${pleroma_domain}/htdocs/
191 191
 
192 192
     pleroma_set_background_image_from_url "$pleroma_domain" "$background_url" "$title"
193 193
 
@@ -201,16 +201,16 @@ function upgrade_pleroma {
201 201
     background_url="$3"
202 202
     title="$4"
203 203
 
204
-    if [ -d ~/build/pleroma ]; then
205
-        set_repo_commit ~/build/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
206
-        cd ~/build/pleroma
204
+    if [ -d $INSTALL_DIR/pleroma ]; then
205
+        set_repo_commit $INSTALL_DIR/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO
206
+        cd $INSTALL_DIR/pleroma
207 207
         npm run build
208
-        if [ ! -d ~/build/pleroma/dist ]; then
208
+        if [ ! -d $INSTALL_DIR/pleroma/dist ]; then
209 209
             echo 'Unable to build pleroma'
210 210
             exit 268362
211 211
         fi
212
-        mv ~/build/pleroma/dist/index.html ~/build/pleroma/dist/pleroma.html
213
-        cp -r ~/build/pleroma/dist/* /var/www/${domain_name}/htdocs/
212
+        mv $INSTALL_DIR/pleroma/dist/index.html $INSTALL_DIR/pleroma/dist/pleroma.html
213
+        cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${domain_name}/htdocs/
214 214
         pleroma_set_background_image_from_url "$domain_name" "$background_url" "$title"
215 215
     else
216 216
         install_pleroma "${app_name}" "${domain_name}" "${background_url}" "${title}"