diff --git a/src/freedombone-utils-gnusocialtools b/src/freedombone-utils-gnusocialtools index 24837929..f66953cc 100755 --- a/src/freedombone-utils-gnusocialtools +++ b/src/freedombone-utils-gnusocialtools @@ -161,33 +161,33 @@ function install_pleroma { background_url="$3" title="$4" - if [ ! -d ~/build/pleroma ]; then + if [ ! -d $INSTALL_DIR/pleroma ]; then function_check git_clone - git_clone $PLEROMA_REPO ~/build/pleroma - if [ ! -d ~/build/pleroma ]; then + git_clone $PLEROMA_REPO $INSTALL_DIR/pleroma + if [ ! -d $INSTALL_DIR/pleroma ]; then echo $'Unable to clone pleroma repo' exit 682252 fi fi - cd ~/build/pleroma + cd $INSTALL_DIR/pleroma git checkout $PLEROMA_COMMIT -b $PLEROMA_COMMIT set_completion_param "${app_name} pleroma commit" "$PLEROMA_COMMIT" npm install -g yarn yarn npm run build - if [ ! -d ~/build/pleroma/dist ]; then + if [ ! -d $INSTALL_DIR/pleroma/dist ]; then echo 'Unable to build pleroma' exit 7629352 fi - if [ ! -f ~/build/pleroma/dist/index.html ]; then + if [ ! -f $INSTALL_DIR/pleroma/dist/index.html ]; then echo $'Unable to build pleroma index.html' exit 5282682 fi - mv ~/build/pleroma/dist/index.html ~/build/pleroma/dist/pleroma.html - cp -r ~/build/pleroma/dist/* /var/www/${pleroma_domain}/htdocs/ + mv $INSTALL_DIR/pleroma/dist/index.html $INSTALL_DIR/pleroma/dist/pleroma.html + cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${pleroma_domain}/htdocs/ pleroma_set_background_image_from_url "$pleroma_domain" "$background_url" "$title" @@ -201,16 +201,16 @@ function upgrade_pleroma { background_url="$3" title="$4" - if [ -d ~/build/pleroma ]; then - set_repo_commit ~/build/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO - cd ~/build/pleroma + if [ -d $INSTALL_DIR/pleroma ]; then + set_repo_commit $INSTALL_DIR/pleroma "${app_name} pleroma commit" "$PLEROMA_COMMIT" $PLEROMA_REPO + cd $INSTALL_DIR/pleroma npm run build - if [ ! -d ~/build/pleroma/dist ]; then + if [ ! -d $INSTALL_DIR/pleroma/dist ]; then echo 'Unable to build pleroma' exit 268362 fi - mv ~/build/pleroma/dist/index.html ~/build/pleroma/dist/pleroma.html - cp -r ~/build/pleroma/dist/* /var/www/${domain_name}/htdocs/ + mv $INSTALL_DIR/pleroma/dist/index.html $INSTALL_DIR/pleroma/dist/pleroma.html + cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${domain_name}/htdocs/ pleroma_set_background_image_from_url "$domain_name" "$background_url" "$title" else install_pleroma "${app_name}" "${domain_name}" "${background_url}" "${title}"