diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube index 07163696..b6729a88 100755 --- a/src/freedombone-app-peertube +++ b/src/freedombone-app-peertube @@ -618,7 +618,7 @@ function mesh_install_peertube { return fi - chroot "$rootdir" apt-get -yq install ffmpeg + chroot "$rootdir" apt-get -yq install ffmpeg curl function_check install_postgresql install_postgresql @@ -635,37 +635,43 @@ function mesh_install_peertube { cd $rootdir$PEERTUBE_DIR git checkout $PEERTUBE_COMMIT -b $PEERTUBE_COMMIT + get_npm_arch cat < $rootdir/usr/bin/install_peertube #!/bin/bash cd $PEERTUBE_DIR -npm install --arch=$NPM_ARCH -g yarn -if [ ! "\$?" = "0" ]; then - echo $'PeerTube Failed to install yarn' - exit 79353234 -fi -npm install --arch=$NPM_ARCH webpack --no-optional -if [ ! "\$?" = "0" ]; then - echo $'PeerTube failed to install webpack' - exit 68386353 -fi -#yarn add -D webpack +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +apt-get -y update +apt-get -yq install yarn + +#npm install --arch=$NPM_ARCH -g yarn #if [ ! "\$?" = "0" ]; then -# echo $'PeerTube failed to add webpack' -# exit 67342823 +# echo $'PeerTube Failed to install yarn' +# exit 79353234 #fi -#yarn install --ignore-optional +#npm install --arch=$NPM_ARCH webpack@3.10.0 --no-optional #if [ ! "\$?" = "0" ]; then -# echo $'PeerTube failed to run yarn install' -# exit 63754235 +# echo $'PeerTube failed to install webpack' +# exit 68386353 #fi -npm install --arch=$NPM_ARCH --no-optional +yarn add -D webpack +if [ ! "\$?" = "0" ]; then + echo $'PeerTube failed to add webpack' + exit 67342823 +fi +yarn install --ignore-optional +if [ ! "\$?" = "0" ]; then + echo $'PeerTube failed to run yarn install' + exit 63754235 +fi +npm install --arch=$NPM_ARCH if [ ! "\$?" = "0" ]; then echo $'PeerTube failed to install peertube' exit 7835243 fi -npm run build --arch=$NPM_ARCH --no-optional +npm run build --arch=$NPM_ARCH if [ ! "\$?" = "0" ]; then echo $'PeerTube failed to build peertube' exit 5293593