Skip to content
Browse files

Merge pull request #14 from adammw/boot-path-patch

Test if BOOT_PATH and ROOT_PATH are unset rather than their default values
  • Loading branch information...
2 parents 77b9ee4 + faad48b commit 3eb5786dd5bb2c730da4321ba24faadea0fde678 @Hexxeh committed Dec 25, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 rpi-update
View
12 rpi-update
@@ -8,6 +8,12 @@ REPO_URI="http://github.com/Hexxeh/rpi-firmware"
UPDATE2=${UPDATE2:-1}
UPDATE_URI="https://github.com/Hexxeh/rpi-update/raw/master/rpi-update"
+if [[ ${BOOT_PATH:-"unset"} == "unset" && ${ROOT_PATH:-"unset"} != "unset" ]] ||
+[[ ${BOOT_PATH:-"unset"} != "unset" && ${ROOT_PATH:-"unset"} == "unset" ]]; then
+ echo "You need to specify both ROOT_PATH and BOOT_PATH, or neither"
+ exit 1
+fi
+
ROOT_PATH=${ROOT_PATH:-"/"}
BOOT_PATH=${BOOT_PATH:-"/boot"}
SKIP_KERNEL=${SKIP_KERNEL:-0}
@@ -164,12 +170,6 @@ if [[ ${UPDATE2} -ne 0 ]]; then
update_self
fi
-if [[ ( "${ROOT_PATH}" == "/" && "${BOOT_PATH}" != "/boot" ) ]] ||
-[[ ( "${BOOT_PATH}" == "/boot" && "${ROOT_PATH}" != "/" ) ]]; then
- echo "You need to specify both ROOT_PATH and BOOT_PATH, or neither"
- exit 1
-fi
-
if [[ ! -d "${FW_PATH}" ]]; then
echo "${FW_PATH} doesn't exist"
exit 1

0 comments on commit 3eb5786

Please sign in to comment.
Something went wrong with that request. Please try again.