mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
create_installstick: quote tests and some more variables
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
701aa86cd6
commit
ec843def64
@ -59,11 +59,11 @@ echo "#########################################################"
|
||||
# check MD5 sums
|
||||
echo "checking MD5 sum..."
|
||||
md5sum -c target/KERNEL.md5
|
||||
MD5_ERROR=$?
|
||||
MD5_ERROR="$?"
|
||||
md5sum -c target/SYSTEM.md5
|
||||
MD5_ERROR=$?
|
||||
MD5_ERROR="$?"
|
||||
|
||||
if [ $MD5_ERROR = 1 ]; then
|
||||
if [ "$MD5_ERROR" = "1" ]; then
|
||||
echo "#########################################################"
|
||||
echo "# #"
|
||||
echo "# OpenELEC.tv failed md5 check - Installation will quit #"
|
||||
@ -76,37 +76,37 @@ if [ $MD5_ERROR = 1 ]; then
|
||||
fi
|
||||
|
||||
# (TODO) umount anything
|
||||
umount $PART
|
||||
umount "$PART"
|
||||
|
||||
# remove any partition on your drive
|
||||
echo "writing new disklabel on $DISK (remove any partition)..."
|
||||
dd if=/dev/zero of=$DISK bs=4096 count=1024
|
||||
parted -s $DISK mklabel msdos
|
||||
dd if=/dev/zero of="$DISK" bs=4096 count=1024
|
||||
parted -s "$DISK" mklabel msdos
|
||||
|
||||
# create one partition
|
||||
echo "create an partition on $DISK..."
|
||||
parted -s $DISK unit cyl mkpart primary fat32 -- 0 -0
|
||||
parted -s "$DISK" unit cyl mkpart primary fat32 -- 0 -0
|
||||
|
||||
# make partition active (bootable)
|
||||
echo "make partition active..."
|
||||
parted -s $DISK set 1 boot on
|
||||
parted -s "$DISK" set 1 boot on
|
||||
|
||||
# tell kernel we have a new partitiontable
|
||||
echo "tell kernel we have a new partitiontable..."
|
||||
partprobe $DISK
|
||||
partprobe "$DISK"
|
||||
|
||||
# make filesystem
|
||||
echo "make filesystem on $PART..."
|
||||
mkfs.vfat $PART -n INSTALL
|
||||
mkfs.vfat "$PART" -n INSTALL
|
||||
|
||||
# install syslinux
|
||||
echo "install syslinux to $PART..."
|
||||
syslinux -f $PART
|
||||
syslinux -f "$PART"
|
||||
|
||||
# mount partition
|
||||
echo "mounting partition $PART to /tmp/usb_install..."
|
||||
mkdir -p /tmp/usb_install
|
||||
mount $PART /tmp/usb_install
|
||||
mount "$PART" /tmp/usb_install
|
||||
|
||||
# copy files
|
||||
echo "copy files to $PART..."
|
||||
@ -122,10 +122,10 @@ fi
|
||||
|
||||
# unmount partition
|
||||
echo "unmounting partition $PART..."
|
||||
umount $PART
|
||||
umount "$PART"
|
||||
|
||||
# cleaning
|
||||
echo "cleaning tempdir..."
|
||||
rmdir /tmp/usb_install
|
||||
|
||||
echo "...ready"
|
||||
echo "...ready"
|
||||
|
Loading…
x
Reference in New Issue
Block a user