fix fatpack with new locale set

This commit is contained in:
rootzoll 2024-10-02 13:09:44 +02:00
parent a8918dbb39
commit 8e20a40dba
3 changed files with 18 additions and 7 deletions

View File

@ -11,10 +11,11 @@
##########################################################################
# set locale to en_US.UTF-8 on system & activate for this script
echo "# updating locale ..."
sed -i "s/^# en_US.UTF-8 UTF-8.*/en_US.UTF-8 UTF-8/g" /etc/locale.gen
sed -i "s/^# en_US ISO-8859-1.*/en_US ISO-8859-1/g" /etc/locale.gen
locale-gen en_US.UTF-8 en_US ISO-8859-1
update-locale LANG=en_US.UTF-8
locale-gen en_US.UTF-8 en_US ISO-8859-1 1>/dev/null
update-locale LANG=en_US.UTF-8 1>/dev/null
source /etc/default/locale
defaultRepo="raspiblitz" # user that hosts a `raspiblitz` repo

View File

@ -81,6 +81,16 @@ echo "# defaultWEBUIuser(${defaultWEBUIuser})"
echo "# defaultWEBUIrepo(${defaultWEBUIrepo})"
sleep 3
if [ "${defaultAPIuser}" == "" ] || [ "${defaultAPIrepo}" == "" ]; then
echo "FAIL: missing defaultAPIuser or defaultAPIrepo"
exit 1
fi
if [ "${defaultWEBUIuser}" == "" ] || [ "${defaultWEBUIrepo}" == "" ]; then
echo "FAIL: missing defaultWEBUIuser or defaultWEBUIrepo"
exit 1
fi
echo "* Adding nodeJS Framework ..."
/home/admin/config.scripts/bonus.nodejs.sh on || exit 1
@ -103,14 +113,14 @@ sudo -u admin curl https://raw.githubusercontent.com/bitcoin/bitcoin/master/cont
# use dev branch when its an Release Candidate
if [ "${isReleaseCandidate}" == "1" ]; then
echo "# RELEASE CANDIDATE: using development branches for WebUI & API"
echo "* Adding Raspiblitz API ..."
echo "* Adding Raspiblitz API (a)..."
sudo /home/admin/config.scripts/blitz.web.api.sh on "${defaultAPIuser}" "${defaultAPIrepo}" "dev" || exit 1
echo "* Adding Raspiblitz WebUI ..."
echo "* Adding Raspiblitz WebUI (a) ..."
sudo /home/admin/config.scripts/blitz.web.ui.sh on "${defaultWEBUIuser}" "${defaultWEBUIrepo}" "master" || exit 1
else
echo "* Adding Raspiblitz API ..."
echo "* Adding Raspiblitz API (b) ..."
sudo /home/admin/config.scripts/blitz.web.api.sh on "${defaultAPIuser}" "${defaultAPIrepo}" "blitz-${branch}" || exit 1
echo "* Adding Raspiblitz WebUI ..."
echo "* Adding Raspiblitz WebUI (b) ..."
sudo /home/admin/config.scripts/blitz.web.ui.sh on "${defaultWEBUIuser}" "${defaultWEBUIrepo}" "release/${branch}" || exit 1
fi

View File

@ -14,7 +14,7 @@ fi
# switch on
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# check if Node.js was installed
if node -v | grep "${VERSION}"; then
if node -v 2>/dev/null | grep "${VERSION}"; then
echo "Node.js $VERSION is already installed"
else
# install prerequisites