copy update script to peak
This commit is contained in:
208
update/fbmint_scr
Normal file
208
update/fbmint_scr
Normal file
@@ -0,0 +1,208 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
echo "** FreeMinT Update script for FireBee Setup2022 **"
|
||||
echo
|
||||
#
|
||||
read -p "Enter new version (3 digits): 1-19-" VER
|
||||
NEWP="/mint/1-19-$VER"
|
||||
#
|
||||
read -p "Enter current installed version (3 digits): 1-19-" OVER
|
||||
OLDP="/c/mint/1-19-$OVER"
|
||||
#
|
||||
if ! [ -d $OLDP/ ]; then
|
||||
echo "Wrong version number (version 1-19-$OVER is not installed!)"
|
||||
echo "Please verify your entries and restart the script."
|
||||
exit
|
||||
fi
|
||||
#
|
||||
echo "Enter your language (for localized program resources, if available)."
|
||||
echo "Languages: en, de, fr, es, it, nl, ru, cs"
|
||||
read -p "Language: " LANG
|
||||
echo
|
||||
#
|
||||
ZBUILD="/Downloads/freemint-1-19-$VER*-col-firebee.zip"
|
||||
#
|
||||
if [ -f $ZBUILD ]; then
|
||||
echo "New version archive: " $ZBUILD
|
||||
else
|
||||
echo $ZBUILD "not found!"
|
||||
echo "Please copy the FreeMiNT archive into your Downloads folder."
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
#
|
||||
ZIEL="/c/mint"
|
||||
NEW="$ZIEL/1-19-$VER"
|
||||
#
|
||||
#
|
||||
echo "Current version: " $OLDP
|
||||
echo "Installation path: " $NEW
|
||||
read -p "Start installation? y/n " JEIN
|
||||
if [ $JEIN == n ]; then
|
||||
exit
|
||||
elif [ $JEIN == y ]; then
|
||||
echo
|
||||
fi
|
||||
#
|
||||
if [ -f /bin/unzip ]; then
|
||||
echo "Unpack archive: " $ZBUILD
|
||||
unzip $ZBUILD -d /ram/minttemp/
|
||||
else
|
||||
echo "Executable unzip not found! Please install unzip into"
|
||||
echo "/mint/sys/bin/ or unpack the archive manually with"
|
||||
echo "Qextract into /ram/minttemp/ (create folder minttemp)."
|
||||
echo "Then select Continue."
|
||||
read -p "Continue (c) or Exit (e) " JEIN
|
||||
if [ $JEIN == c ]; then
|
||||
if [ -d /ram/minttemp/mint/ ]; then
|
||||
echo "Go!"
|
||||
else
|
||||
echo "No way!"
|
||||
exit
|
||||
fi
|
||||
elif [ $JEIN == e ]; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
#
|
||||
BUILD="/ram/minttemp"
|
||||
#
|
||||
cd $BUILD$NEWP
|
||||
#
|
||||
echo "Update FreeMiNT tools and executables"
|
||||
#
|
||||
if [ $LANG == de ]; then
|
||||
mv sys-root/opt/GEM/toswin2/toswin2.rsc sys-root/opt/GEM/toswin2/toswin2.rsx
|
||||
cp sys-root/opt/GEM/toswin2/de/toswin2.rsc sys-root/opt/GEM/toswin2/
|
||||
fi
|
||||
cp -r sys-root/opt/GEM/toswin2/ $ZIEL/tools/
|
||||
#
|
||||
if [ $LANG == de ]; then
|
||||
mv sys-root/opt/GEM/fsetter/fsetter.rsc sys-root/opt/GEM/fsetter/fsetter.rsx
|
||||
cp sys-root/opt/GEM/fsetter/de/fsetter.rsc sys-root/opt/GEM/fsetter/
|
||||
fi
|
||||
cp -r sys-root/opt/GEM/fsetter/ $ZIEL/tools/
|
||||
#
|
||||
cp -r sys-root/opt/GEM/gluestik/ $ZIEL/tools/
|
||||
cp -r sys-root/opt/GEM/mgw/ $ZIEL/tools/
|
||||
#
|
||||
cp sys-root/bin/* /c/mint/sys/bin/
|
||||
#
|
||||
echo "GEM tools updating:"
|
||||
echo
|
||||
read -p "Update CopS? y/n " JEIN
|
||||
if [ $JEIN == y ]; then
|
||||
cp sys-root/opt/GEM/cops/cops.app /c/mint/mint_acc/cops.acc
|
||||
cp sys-root/opt/GEM/cops/copsicn.rsc /c/mint/mint_acc/
|
||||
fi
|
||||
#
|
||||
read -p "Update TeraDesk? y/n " JEIN
|
||||
if [ $JEIN == y ]; then
|
||||
rm sys-root/opt/GEM/teradesk/DESKTO*.PRG
|
||||
mv sys-root/opt/GEM/teradesk/cicons.rsc sys-root/opt/GEM/teradesk/cicons.rsx
|
||||
mv sys-root/opt/GEM/teradesk/icons.rsc sys-root/opt/GEM/teradesk/icons.rsx
|
||||
if [ $LANG == de ]; then
|
||||
cp sys-root/opt/GEM/teradesk/rsc/de/desktop.rsc sys-root/opt/GEM/teradesk/
|
||||
elif [ $LANG == fr ]; then
|
||||
cp sys-root/opt/GEM/teradesk/rsc/fr/desktop.rsc sys-root/opt/GEM/teradesk/
|
||||
elif [ $LANG == it ]; then
|
||||
cp sys-root/opt/GEM/teradesk/rsc/it/desktop.rsc sys-root/opt/GEM/teradesk/
|
||||
elif [ $LANG == ru ]; then
|
||||
cp sys-root/opt/GEM/teradesk/rsc/ru/desktop.rsc sys-root/opt/GEM/teradesk/
|
||||
fi
|
||||
cp -r sys-root/opt/GEM/teradesk/* /c/teradesk/
|
||||
cp sys-root/opt/GEM/teradesk/desk_cf.prg /c/teradesk/teratos/
|
||||
cp sys-root/opt/GEM/teradesk/desktop.rsc /c/teradesk/teratos/
|
||||
cp sys-root/opt/GEM/teradesk/doc/TERADESK.* /c/guides/
|
||||
cp sys-root/opt/GEM/teradesk/doc/de/TERADESK.* /c/guides/de/
|
||||
cp sys-root/opt/GEM/teradesk/doc/ru/TERADESK.* /c/guides/ru/
|
||||
fi
|
||||
#
|
||||
read -p "Update QED? y/n " JEIN
|
||||
if [ $JEIN == y ]; then
|
||||
mv sys-root/opt/GEM/qed/qed.cfg sys-root/opt/GEM/qed/qed.cfx
|
||||
if [ $LANG == de ]; then
|
||||
cp sys-root/opt/GEM/qed/de/qed.rsc sys-root/opt/GEM/qed/
|
||||
cp sys-root/opt/GEM/qed/de/doc/qed.hyp /c/guides/DE/
|
||||
cp sys-root/opt/GEM/qed/de/doc/qed.ref /c/guides/DE/
|
||||
elif [ $LANG == fr ]; then
|
||||
cp sys-root/opt/GEM/qed/fr/qed.rsc sys-root/opt/GEM/qed/
|
||||
elif [ $LANG == nl ]; then
|
||||
cp sys-root/opt/GEM/qed/nl/qed.rsc sys-root/opt/GEM/qed/
|
||||
cp sys-root/opt/GEM/qed/nl/doc/qed.hyp /c/guides/NL/
|
||||
cp sys-root/opt/GEM/qed/nl/doc/qed.ref /c/guides/NL/
|
||||
fi
|
||||
#
|
||||
if ! [ -d /c/tools/qed/kurz_new/ ]; then
|
||||
mkdir /c/tools/qed/kurz_new
|
||||
fi
|
||||
if ! [ -d /c/tools/qed/synt_new/ ]; then
|
||||
mkdir /c/tools/qed/synt_new
|
||||
fi
|
||||
#
|
||||
if [ $LANG == de ]; then
|
||||
cp sys-root/opt/GEM/qed/kurzel/* /c/tools/qed/kurz_new/
|
||||
cp sys-root/opt/GEM/qed/de/syntax/* /c/tools/qed/synt_new/
|
||||
elif [ $LANG == fr ]; then
|
||||
cp sys-root/opt/GEM/qed/kurzel/* /c/tools/qed/kurz_new/
|
||||
cp sys-root/opt/GEM/qed/fr/syntax/* /c/tools/qed/synt_new/
|
||||
elif [ $LANG == nl ]; then
|
||||
cp sys-root/opt/GEM/qed/nl/kurzel/* /c/tools/qed/kurz_new/
|
||||
cp sys-root/opt/GEM/qed/nl/syntax/* /c/tools/qed/synt_new/
|
||||
else
|
||||
cp sys-root/opt/GEM/qed/kurzel/* /c/tools/qed/kurz_new/
|
||||
cp sys-root/opt/GEM/qed/syntax/* /c/tools/qed/synt_new/
|
||||
fi
|
||||
rm -r sys-root/opt/GEM/qed/kurzel/
|
||||
rm -r sys-root/opt/GEM/qed/syntax/
|
||||
#
|
||||
cp -r sys-root/opt/GEM/qed/* /c/tools/qed/
|
||||
fi
|
||||
#
|
||||
read -p "Update HypView? y/n " JEIN
|
||||
if [ $JEIN == y ]; then
|
||||
mv sys-root/opt/GEM/hypview/hyp_view.cfg sys-root/opt/GEM/hypview/hyp_view.cfx
|
||||
if [ $LANG == de ]; then
|
||||
cp sys-root/opt/GEM/hypview/de/hyp_view.rsc sys-root/opt/GEM/hypview/
|
||||
elif [ $LANG == cs ]; then
|
||||
cp sys-root/opt/GEM/hypview/cs/hyp_view.rsc sys-root/opt/GEM/hypview/
|
||||
fi
|
||||
cp -r sys-root/opt/GEM/hypview/* /c/tools/hyp_view/
|
||||
fi
|
||||
#
|
||||
# REMOVE UNNEEDED FILES
|
||||
rm -r usb/
|
||||
rm -r sys-root/
|
||||
#
|
||||
echo "Copy new version to: " $ZIEL
|
||||
cp -r $BUILD$NEWP/ /$ZIEL/
|
||||
echo
|
||||
#
|
||||
if [ -f /bin/sed ]; then
|
||||
echo "Copy your current configuration from: " $OLDP
|
||||
mv $NEW/mint.cnf $NEW/mint_def.cnf
|
||||
mv $NEW/xaaes/xaaes.cnf $NEW/xaaes/xa_def.cnf
|
||||
sed s/$OVER/$VER/ $OLDP/mint.cnf > $NEW/mint.cnf
|
||||
cp $OLDP/MINT.INI $NEW/
|
||||
cp $OLDP/*.tbl $NEW/
|
||||
sed s/$OVER/$VER/ $OLDP/xaaes/xaaes.cnf > $NEW/xaaes/xaaes.cnf
|
||||
cp $OLDP/xaaes/xaaes.inf $NEW/xaaes/
|
||||
cp $OLDP/xaaes/widgets/bee* $NEW/xaaes/widgets/
|
||||
cp -r $OLDP/xaaes/[0-9]*.[0-9]*/ $NEW/xaaes/
|
||||
else
|
||||
echo "Can not copy current FreeMiNT/XaAES config to new version."
|
||||
echo "Executable sed is missing."
|
||||
fi
|
||||
#
|
||||
cd $BUILD
|
||||
#
|
||||
echo "Update hypertexts"
|
||||
cp -r guides/* /c/guides/
|
||||
echo
|
||||
#
|
||||
echo "Update AUTO folder"
|
||||
mv /c/auto/mint-$OVER.prg /c/auto/mint-$OVER.prx
|
||||
cp auto/mint-$VER.prg /c/auto/
|
||||
echo
|
||||
#
|
||||
echo "Installation complete. Please reboot your system!"
|
||||
Reference in New Issue
Block a user