Files
recycled-ni-neutrino/data/scripts/migration.sh.in
vanhofen 0eaa4b5791 introduce configurable ZAPITDIR
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6161eeef9b
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-10-19 (Tue, 19 Oct 2021)

Origin message was:
------------------
- introduce configurable ZAPITDIR

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
2021-10-19 22:35:24 +02:00

65 lines
1.5 KiB
Bash

#!/bin/sh
cd @CONFIGDIR@
if [ -e neutrino.conf ]; then
# remove NG leftovers
sed -i 's|ng_netfs_\(.*\)|netfs_\1|' neutrino.conf
# webradio_usr.xml was moved
sed -i "s|@CONFIGDIR@/webradio_usr.xml|@WEBRADIODIR_VAR@/webradio_usr.xml|" neutrino.conf
mkdir -p @WEBRADIODIR_VAR@/
if [ -e @CONFIGDIR@/webradio_usr.xml ]; then
mv @CONFIGDIR@/webradio_usr.xml @WEBRADIODIR_VAR@/
fi
# webtv_usr.xml was moved
sed -i "s|@CONFIGDIR@/webtv_usr.xml|@WEBTVDIR_VAR@/webtv_usr.xml|" neutrino.conf
mkdir -p @WEBTVDIR_VAR@/
if [ -e @CONFIGDIR@/webtv_usr.xml ]; then
mv @CONFIGDIR@/webtv_usr.xml @WEBTVDIR_VAR@/
fi
# remove all old glcd_ keywords; neutrino will add the new ones
if ! grep -q glcd_foreground_color neutrino.conf ; then
sed -i "/^glcd_/d" neutrino.conf
fi
sort neutrino.conf > neutrino.sort
mv neutrino.sort neutrino.conf
fi
if [ -e zapit/frontend.conf ]; then
# uni_qrg was renamed to uni_freq
sed -i "s|_uni_qrg=|_uni_freq=|g" @ZAPITDIR@/frontend.conf
fi
controlscripts="\
audioplayer.start \
audioplayer.end \
deepstandby.on \
deepstandby.off \
inactivity.on \
movieplayer.start \
movieplayer.end \
neutrino.start \
pictureviewer.start \
pictureviewer.end \
recording.timer \
recording.start \
recording.end \
scan.start \
scan.stop \
standby.on \
standby.off \
"
mkdir -p @CONTROLDIR_VAR@/
for controlscript in $controlscripts; do
if [ -e $controlscript ]; then
mv $controlscript @CONTROLDIR_VAR@/
fi
done
rm -f migration.sh
rm -f flash.start