yab | yet another Basic for HAIKU
update to hrev script. - Printable Version

+- yab | yet another Basic for HAIKU (http://yab.orgfree.com/forum)
+-- Forum: General discussion (http://yab.orgfree.com/forum/forumdisplay.php?fid=8)
+--- Forum: Off topic (http://yab.orgfree.com/forum/forumdisplay.php?fid=9)
+--- Thread: update to hrev script. (/showthread.php?tid=7)



update to hrev script. - bbjimmy - 06-25-2015

There are times that one needs to update your install to a previous version. this little script can help:


Code:
#!/bin/bash

read -e -p "Add repositories for: hrev" hrev

pkgman add http://packages.haiku-os.org/haiku/master/$(getarch)/r1~alpha4_pm_hrev$hrev
if [ "$?" -ne "0" ]; then
    echo "Failure detected, exiting."
    exit 1
fi
pkgman add http://packages.haiku-os.org/haikuports/master/repo/$(getarch)/by_hrev/hrev$hrev
if [ "$?" -ne "0" ]; then
    echo "Failure detected, exiting."
    exit 1
fi

while true; do
    read -p "Do you want to update now? [yes/no] " yn
    case $yn in
        [Yy]* ) pkgman update; break;;
        [Nn]* ) exit;;
        * ) echo "Please answer y or n.";;
    esac
done



RE: update to hrev script. - clasqm - 08-01-2015

It works well up to the last bit

Code:
/boot/home/config/non-packaged/bin/update2hrev: line 19: syntax error near unexpected token `)'
/boot/home/config/non-packaged/bin/update2hrev: line 19: `        [Yy]* ) pkgman update; break;;'
[/code]



RE: update to hrev script. - bbjimmy - 08-01-2015

(08-01-2015, 12:30 AM)clasqm Wrote: It works well up to the last bit

Code:
/boot/home/config/non-packaged/bin/update2hrev: line 19: syntax error near unexpected token `)'
/boot/home/config/non-packaged/bin/update2hrev: line 19: `        [Yy]* ) pkgman update; break;;'
[/code]

Sometimes that happens when copy/pasting code from a website. The web seems to add unprintable characters that bash can't understand. try re-typing the last few lines ans see if that doesn't fix the issue.


Free Web Hosting