Skip to content
Snippets Groups Projects
Commit 5b668dd6 authored by Bob Mottram's avatar Bob Mottram
Browse files

Install bower as root

parent a65e065c
Branches stretch
No related tags found
No related merge requests found
Pipeline #73572 failed
...@@ -127,7 +127,9 @@ function upgrade_cryptpad { ...@@ -127,7 +127,9 @@ function upgrade_cryptpad {
cryptpad_create_config cryptpad_create_config
npm upgrade npm upgrade
npm install npm install
su -c 'npm install bower@1.8.4' - cryptpad if [ ! -d "$CRYPTPAD_DIR/node_modules/bower/bin/bower" ]; then
npm install bower@1.8.8
fi
rm -rf $CRYPTPAD_DIR/.cache/bower rm -rf $CRYPTPAD_DIR/.cache/bower
su -c './node_modules/bower/bin/bower install --config.interactive=false' - cryptpad su -c './node_modules/bower/bin/bower install --config.interactive=false' - cryptpad
su -c './node_modules/bower/bin/bower update --config.interactive=false' - cryptpad su -c './node_modules/bower/bin/bower update --config.interactive=false' - cryptpad
...@@ -659,13 +661,7 @@ function install_cryptpad { ...@@ -659,13 +661,7 @@ function install_cryptpad {
increment_app_install_progress increment_app_install_progress
su -c 'npm install bower@1.8.4' - cryptpad
increment_app_install_progress
chown -R cryptpad:cryptpad $CRYPTPAD_DIR chown -R cryptpad:cryptpad $CRYPTPAD_DIR
su -c './node_modules/bower/bin/bower install --config.interactive=false' - cryptpad
su -c './node_modules/bower/bin/bower update --config.interactive=false' - cryptpad
cp config/config.example.js config/config.js cp config/config.example.js config/config.js
if [ ! -f config/config.js ]; then if [ ! -f config/config.js ]; then
echo $'Cryptpad config file not found' echo $'Cryptpad config file not found'
...@@ -710,7 +706,12 @@ function install_cryptpad { ...@@ -710,7 +706,12 @@ function install_cryptpad {
# install again # install again
cd $CRYPTPAD_DIR || exit 73 cd $CRYPTPAD_DIR || exit 73
npm install bower@1.8.8
increment_app_install_progress
chown -R cryptpad:cryptpad $CRYPTPAD_DIR/node_modules/bower
su -c './node_modules/bower/bin/bower install --config.interactive=false' - cryptpad su -c './node_modules/bower/bin/bower install --config.interactive=false' - cryptpad
increment_app_install_progress
su -c './node_modules/bower/bin/bower update --config.interactive=false' - cryptpad
increment_app_install_progress increment_app_install_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment