If I was guessing I'd say store the Grog script in /tmp/filename.sh, and then bash /tmp/filename.sh
This is the script
Code:
rm -rf /media/hdd/viximage && mkdir -p /media/hdd/viximage && cd /media/hdd/viximage/
options=$(wget -O - https://www.openvix.co.uk/index.php/downloads/ |grep index.php\/downloads|grep img|grep -Eoi '<a [^>]+>'|sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp" | sed -E 's#https://www.openvix.co.uk/index.php/(.*/)?.*$#\1#'|sed -E "s#downloads/(.*?)#\1#"|sed -E "s#(.*?)-images#\1#"|sed -E 's#/$##' )
PS3="Please select the brand of your box"
select opt in $options; do
case "$REPLY" in
[1-9] ) echo "You picked $opt which is option $REPLY";break;;
[1-3][0-9] ) echo "You picked $opt which is option $REPLY";break;;
*) echo "Invalid option. rerun the script to Try another one.";break;;
esac
done
imageurl="https://www.openvix.co.uk/index.php/downloads/$opt-images";
echo "now getting list of $opt boxes from $imageurl";
options1=$(wget -O - $imageurl|grep index.php\/|grep $opt|grep -Eoi '<a [^>]+>'|sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp" |sed -E 's#downloads##g'| sed -E 's#https://www.openvix.co.uk/index.php//'$opt'(.*/)?.*$#\1#'|sed -E "s#/$opt-images/(.*?)#\1#"|sed -E "s#(.*?)-images#\1#"|sed -E 's#/$##'|sed -E 's#^/##' )
PS3="Please select model of your box"
select opt1 in $options1; do
case "$REPLY" in
[1-9] ) echo "You picked $opt1 which is option $REPLY";break;;
[1-3][0-9] ) echo "You picked $opt1 which is option $REPLY";break;;
*) echo "Invalid option. rerun the script to Try another one.";break;;
esac
done
imageurl1="$imageurl/$opt1"
read -p "If using multiboot box please enter partition to flash: " MULTIBOOT
wget -O latestvix.zip $(wget -O - $imageurl1|grep http|sed 's/http/\nhttp/g'|grep openvix\-builds| sed 's/\(^http[^ <]*\)\(.*\)/\1/g'|sed -n 1p|sed "s#\"##g") && unzip latestvix.zip && cd $(find /media/hdd/viximage/ -type d -maxdepth 4 2> /dev/null|sed '$!d') && ofgwrite -r -k $( [[ ! -z "$MULTIBOOT" ]] && printf %s '-m'$MULTIBOOT' ')./