Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gui install fix - Only replace 1st instance of XX_ALLSKY_HOME_XX #710

Merged
merged 5 commits into from
Oct 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions gui/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ modify_locations() { # Some files have placeholders for certain locations. Modi
echo -e "${GREEN}* Modifying locations in web files${NC}"
(
cd "${PORTAL_DIR}/includes"
sed -i "s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};" functions.php save_file.php
# NOTE: Only want to replace the FIRST instance of XX_ALLSKY_HOME_XX in funciton.php
# Otherwise, the edit check in functions.php will always fail.
sed -i "0,/XX_ALLSKY_HOME_XX/{s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};}" functions.php
sed -i "s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};" save_file.php
sed -i -e "s;XX_ALLSKY_SCRIPTS_XX;${ALLSKY_SCRIPTS};" \
-e "s;XX_ALLSKY_IMAGES_XX;${ALLSKY_IMAGES};" \
-e "s;XX_ALLSKY_CONFIG_XX;${ALLSKY_CONFIG};" \
Expand Down Expand Up @@ -155,4 +158,4 @@ if (whiptail --title "Allsky Software Installer" --yesno "The Allsky WebUI is no
reboot now
else
exit 3
fi
fi