Skip to content

Commit

Permalink
Merge pull request #1 from Locutus73/main
Browse files Browse the repository at this point in the history
Version 1.1 - Added xow binary and xow_init_script download
  • Loading branch information
sofakng authored Jan 25, 2021
2 parents 110e8d9 + 862dfe3 commit 7ec6f38
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 15 deletions.
32 changes: 28 additions & 4 deletions xow_on.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
# https://github.com/MiSTer-devel/Scripts_MiSTer

# Version 1.0 - 2021-01-21 - First commit
# Version 1.1 - 2021-01-25 - Added xow binary and xow_init_script download

LINUX_PATH="/media/fat/linux"
XOW_INIT_SCRIPT="$LINUX_PATH/xow_init_script"
MISTER_XOW_URL="https://github.com/MiSTer-devel/xow_MiSTer"

if [ "$(uname -n)" != "MiSTer" ]
then
Expand All @@ -30,11 +32,33 @@ then
exit 1
fi

if [ ! -f "${LINUX_PATH}/xow" ]
#if [ ! -f "${LINUX_PATH}/xow" ]
#then
# echo "xow binary not found."
# echo "Please run updater script."
# exit 1
#fi
if ! which "xow" &>/dev/null
then
echo "xow binary not found."
echo "Please run updater script."
exit 1
echo "Downloading xow binary and xow_init_script"
curl -L "$MISTER_XOW_URL/blob/main/xow" -o "${LINUX_PATH}/xow"
case $? in
0)
curl -L "$MISTER_XOW_URL/blob/main/xow_init_script" -o "${LINUX_PATH}/xow_init_script"
;;
60)
if ! curl -kL "$MISTER_XOW_URL/blob/main/xow?raw=true" -o "${LINUX_PATH}/xow"
then
echo "No Internet connection"
exit 2
fi
curl -kL "$MISTER_XOW_URL/blob/main/xow_init_script?raw=true" -o "${LINUX_PATH}/xow_init_script"
;;
*)
echo "No Internet connection"
exit 2
;;
esac
fi

mount | grep "on / .*[(,]ro[,$]" -q && RO_ROOT="true"
Expand Down
39 changes: 28 additions & 11 deletions xow_pairing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
# https://github.com/MiSTer-devel/Scripts_MiSTer

# Version 1.0 - 2021-01-21 - First commit
# Version 1.1 - 2021-01-25 - Added xow binary and xow_init_script download

LINUX_PATH="/media/fat/linux"
XOW_INIT_SCRIPT="$LINUX_PATH/xow_init_script"
MISTER_XOW_URL="https://github.com/MiSTer-devel/xow_MiSTer"

if [ "$(uname -n)" != "MiSTer" ]
then
Expand All @@ -30,18 +32,33 @@ then
exit 1
fi

if [ ! -f "${LINUX_PATH}/xow" ]
#if [ ! -f "${LINUX_PATH}/xow" ]
#then
# echo "xow binary not found."
# echo "Please run updater script."
# exit 1
#fi
if ! which "xow" &>/dev/null
then
echo "xow binary not found."
echo "Please run updater script."
exit 1
fi

if [ ! -f "${LINUX_PATH}/xow" ]
then
echo "xow binary not found."
echo "Please run updater script."
exit 1
echo "Downloading xow binary and xow_init_script"
curl -L "$MISTER_XOW_URL/blob/main/xow" -o "${LINUX_PATH}/xow"
case $? in
0)
curl -L "$MISTER_XOW_URL/blob/main/xow_init_script" -o "${LINUX_PATH}/xow_init_script"
;;
60)
if ! curl -kL "$MISTER_XOW_URL/blob/main/xow?raw=true" -o "${LINUX_PATH}/xow"
then
echo "No Internet connection"
exit 2
fi
curl -kL "$MISTER_XOW_URL/blob/main/xow_init_script?raw=true" -o "${LINUX_PATH}/xow_init_script"
;;
*)
echo "No Internet connection"
exit 2
;;
esac
fi

if [ -z "$(pidof xow)" ]
Expand Down

0 comments on commit 7ec6f38

Please sign in to comment.