refactor: remove dead code, fix home screen config bug
This commit is contained in:
@@ -23,7 +23,7 @@ inject_config() {
|
||||
|
||||
if [ -f "$config" ]; then
|
||||
local config_json=$(cat "$config" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
|
||||
sed "s|const config = {.*};|const config = $config_json;|" "$src" > "$dst"
|
||||
sed "s|const config = {};|const config = $config_json;|" "$src" > "$dst"
|
||||
echo " Injected config.json into home screen"
|
||||
else
|
||||
cp "$src" "$dst"
|
||||
@@ -67,7 +67,7 @@ if [ -n "$KIOSK" ]; then
|
||||
git pull
|
||||
# Inject config at deploy time
|
||||
config_json=\$(cat config.json | sed 's/\\\\/\\\\\\\\/g' | sed 's/\"/\\\\\"/g' | tr '\n' ' ')
|
||||
sed \"s|const config = {.*};|const config = \$config_json;|\" home-screen-index.html > /home/jgitta/kiosk-home/index.html
|
||||
sed \"s|const config = {};|const config = \$config_json;|\" home-screen-index.html > /home/jgitta/kiosk-home/index.html
|
||||
/usr/local/bin/kiosk-restart
|
||||
"
|
||||
echo " Production updated."
|
||||
|
||||
Reference in New Issue
Block a user