Procházet zdrojové kódy

re-enable git-ssb setup with paths

Bob Mottram před 7 roky
rodič
revize
12c0eed38b
1 změnil soubory, kde provedl 13 přidání a 12 odebrání
  1. 13
    12
      src/freedombone-app-scuttlebot

+ 13
- 12
src/freedombone-app-scuttlebot Zobrazit soubor

259
 
259
 
260
 function scuttlebot_git_setup {
260
 function scuttlebot_git_setup {
261
     if [[ "$1" == "mesh" ]]; then
261
     if [[ "$1" == "mesh" ]]; then
262
-        if [ ! -d "$rootdir/root/.npm-global/lib/node_modules/git-ssb-web/highlight" ]; then
263
-            mkdir "$rootdir/root/.npm-global/lib/node_modules/git-ssb-web/highlight"
262
+
263
+        if [ ! -d "$rootdir/root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight" ]; then
264
+            mkdir "$rootdir/root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight"
264
         fi
265
         fi
265
-        if [ ! -f "$rootdir/root/.npm-global/highlight.js/styles/foundation.css" ]; then
266
+        if [ ! -f "$rootdir/root/.npm-global/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css" ]; then
266
             echo $'Could not find foundation.css'
267
             echo $'Could not find foundation.css'
267
             exit 347687245
268
             exit 347687245
268
         fi
269
         fi
269
-        cp "$rootdir/root/.npm-global/lib/node_modules/highlight.js/styles/foundation.css" "$rootdir/root/.npm-global/lib/node_modules/git-ssb-web/highlight/foundation.css"
270
+        cp "$rootdir/root/.npm-global/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css" "$rootdir/root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight/foundation.css"
270
 
271
 
271
         git_ssb_nginx_site=$rootdir/etc/nginx/sites-available/git_ssb
272
         git_ssb_nginx_site=$rootdir/etc/nginx/sites-available/git_ssb
272
         { echo 'server {';
273
         { echo 'server {';
284
             exit 7357225
285
             exit 7357225
285
         fi
286
         fi
286
 
287
 
287
-        if [ ! -d /root/.npm-global/lib/node_modules/git-ssb-web/highlight ]; then
288
-            mkdir /root/.npm-global/lib/node_modules/git-ssb-web/highlight
288
+        if [ ! -d /root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight ]; then
289
+            mkdir /root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight
289
         fi
290
         fi
290
-        if [ ! -f /root/.npm-global/lib/node_modules/highlight.js/styles/foundation.css ]; then
291
+        if [ ! -f /root/.npm-global/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css ]; then
291
             echo $'Could not find foundation.css'
292
             echo $'Could not find foundation.css'
292
             exit 347687245
293
             exit 347687245
293
         fi
294
         fi
294
-        cp /root/.npm-global/lib/node_modules/highlight.js/styles/foundation.css /root/.npm-global/lib/node_modules/git-ssb-web/highlight/foundation.css
295
+        cp /root/.npm-global/lib/node_modules/git-ssb/node_modules/highlight.js/styles/foundation.css /root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web/highlight/foundation.css
295
 
296
 
296
         git_ssb_nginx_site=/etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME}
297
         git_ssb_nginx_site=/etc/nginx/sites-available/${SCUTTLEBOT_DOMAIN_NAME}
297
         function_check nginx_http_redirect
298
         function_check nginx_http_redirect
313
     fi
314
     fi
314
 
315
 
315
     { echo '';
316
     { echo '';
316
-      echo '  root /root/.npm-global/lib/node_modules/git-ssb-web;';
317
+      echo '  root /root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web;';
317
       echo '';
318
       echo '';
318
       echo '  location = / {';
319
       echo '  location = / {';
319
       echo "    proxy_pass http://localhost:${GIT_SSB_PORT};";
320
       echo "    proxy_pass http://localhost:${GIT_SSB_PORT};";
339
           echo '  add_header X-Content-Type-Options nosniff;';
340
           echo '  add_header X-Content-Type-Options nosniff;';
340
           echo '  add_header X-Frame-Options SAMEORIGIN;';
341
           echo '  add_header X-Frame-Options SAMEORIGIN;';
341
           echo '';
342
           echo '';
342
-          echo '  root /root/.npm-global/lib/node_modules/git-ssb-web;';
343
+          echo '  root /root/.npm-global/lib/node_modules/git-ssb/node_modules/git-ssb-web;';
343
           echo '';
344
           echo '';
344
           echo '  location = / {';
345
           echo '  location = / {';
345
           echo "    proxy_pass http://localhost:${GIT_SSB_PORT};";
346
           echo "    proxy_pass http://localhost:${GIT_SSB_PORT};";
443
       echo '[Install]';
444
       echo '[Install]';
444
       echo 'WantedBy=multi-user.target'; } > "$rootdir/etc/systemd/system/scuttlebot.service"
445
       echo 'WantedBy=multi-user.target'; } > "$rootdir/etc/systemd/system/scuttlebot.service"
445
 
446
 
446
-    #scuttlebot_git_setup mesh
447
-    #git_ssb_script mesh
447
+    scuttlebot_git_setup mesh
448
+    git_ssb_script mesh
448
 }
449
 }
449
 
450
 
450
 function install_scuttlebot {
451
 function install_scuttlebot {