Browse Source

Switching paths

Bob Mottram 7 years ago
parent
commit
1ed1a4a56d
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/freedombone-app-peertube

+ 7
- 0
src/freedombone-app-peertube View File

@@ -777,12 +777,15 @@ function install_peertube {
777 777
         echo $'Failed to install local npm version 5.6.0'
778 778
         exit 45465774
779 779
     fi
780
+    PREV_PATH=$PATH
780 781
     PATH=$(npm bin):$PATH
781 782
     npm install node@9.5.0
782 783
     if [ ! "$?" = "0" ]; then
784
+        PATH=$PREV_PATH
783 785
         echo $'Failed to install local nodejs version 9.5.0'
784 786
         exit 54875459
785 787
     fi
788
+    PATH=$PREV_PATH
786 789
     npm install npm@5.6.0
787 790
     if [ ! "$?" = "0" ]; then
788 791
         echo $'Failed to install local npm version 5.6.0'
@@ -793,6 +796,7 @@ function install_peertube {
793 796
         echo $'Failed to install yarn'
794 797
         exit 578947946
795 798
     fi
799
+    PATH=$(npm bin):$PATH
796 800
     yarn add -D webpack --network-concurrency 1
797 801
     #yarn install --non-interactive
798 802
     #if [ ! "$?" = "0" ]; then
@@ -801,14 +805,17 @@ function install_peertube {
801 805
     #fi
802 806
     npm install
803 807
     if [ ! "$?" = "0" ]; then
808
+        PATH=$PREV_PATH
804 809
         echo $'Failed to install peertube'
805 810
         exit 7835243
806 811
     fi
807 812
     npm run build
808 813
     if [ ! "$?" = "0" ]; then
814
+        PATH=$PREV_PATH
809 815
         echo $'Failed to build peertube'
810 816
         exit 5293593
811 817
     fi
818
+    PATH=$PREV_PATH
812 819
 
813 820
     PEERTUBE_ONION_HOSTNAME=$(add_onion_service peertube 80 ${PEERTUBE_ONION_PORT})
814 821