Skip to content

Commit

Permalink
scripts: fix syntax errors resulting from moving code around
Browse files Browse the repository at this point in the history
Additionally, cut out the /dev/ prefix
  • Loading branch information
austin987 committed Dec 26, 2020
1 parent ad15926 commit bf639d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions kernel/resources/shared/FlashKernelPartition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ get_device() {
}

get_emmc_devname() {
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//")
if [ -z "$devname" ]
then
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//" | cut -d / -f 3)
if [ -z "$devname" ]; then
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"
exit 1
fi
echo $devname
}
Expand Down
5 changes: 3 additions & 2 deletions scripts/InstallScripts/InstallPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ get_device() {
}

get_emmc_devname() {
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//")
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//" | cut -d / -f 3)
if [ -z "$devname" ]
then
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"
exit 1
fi
echo $devname
}
Expand Down
8 changes: 4 additions & 4 deletions scripts/InstallScripts/InstallPrawnOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ get_device() {
}

get_emmc_devname() {
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//")
if [ -z "$devname" ]
then
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;
local devname=$(ls /dev/mmcblk* | grep -F boot0 | sed "s/boot0//" | cut -d / -f 3)
if [ -z "$devname" ]; then
echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"
exit 1
fi
echo $devname
}
Expand Down

0 comments on commit bf639d7

Please sign in to comment.