fix busted installer

a past refactor moved $A_PATH use to before it was defined
This commit is contained in:
Shaun Inman 2023-02-24 20:26:10 -05:00
parent f713b3d84a
commit 26dcebd5fe

View file

@ -7,12 +7,15 @@ TF2_PATH=/mnt/sdcard # TF1 should be linked to this path if TF2 is missing or do
SYSTEM_PATH=${TF2_PATH}/.system/rg35xx SYSTEM_PATH=${TF2_PATH}/.system/rg35xx
FLAG_PATH=/misc/.minstalled FLAG_PATH=/misc/.minstalled
echo "installing/updating"
# old rootfs.img (alpha-only) # old rootfs.img (alpha-only)
if [ -f $SYSTEM_PATH/rootfs.img ]; then if [ -f $SYSTEM_PATH/rootfs.img ]; then
rm $SYSTEM_PATH/rootfs.img rm $SYSTEM_PATH/rootfs.img
fi fi
if [ ! -f $FLAG_PATH ]; then if [ ! -f $FLAG_PATH ]; then
echo "backing up"
BAK_PATH=$TF1_PATH/bak BAK_PATH=$TF1_PATH/bak
mkdir -p $BAK_PATH mkdir -p $BAK_PATH
cp /misc/modules/gpio_keys_polled.ko $BAK_PATH cp /misc/modules/gpio_keys_polled.ko $BAK_PATH
@ -23,16 +26,15 @@ fi
was_updated() { was_updated() {
for FILE in /misc/* /misc/*/*; do for FILE in /misc/* /misc/*/*; do
A_PATH=$FILE
A_NAME=$(busybox basename "$A_PATH") A_NAME=$(busybox basename "$A_PATH")
B_PATH=$SYSTEM_PATH/dat/$A_NAME
if [[ "$A_NAME" == "boot_logo.bmp.gz" ]]; then if [[ "$A_NAME" == "boot_logo.bmp.gz" ]]; then
# we don't care if the user has changed their boot logo # we don't care if the user has changed their boot logo
continue continue
fi fi
A_PATH=$FILE
B_PATH=$SYSTEM_PATH/dat/$A_NAME
if [ ! -f "$B_PATH" ]; then if [ ! -f "$B_PATH" ]; then
continue continue
fi fi