fix: sleeping and missing ~/Downloads folder

This commit is contained in:
Peter Šurda 2021-03-05 21:46:38 +01:00
parent e102469a54
commit b69f341b89
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,8 @@ function download_version()
local release_version="$1" local release_version="$1"
local drive="$2" local drive="$2"
local downloads=~/Downloads local downloads=~/Downloads
mkdir -p "$downloads"
pushd "$downloads" pushd "$downloads"
download_and_verify "$release_version" boot-kernel download_and_verify "$release_version" boot-kernel
@ -34,6 +36,8 @@ function install_version()
local target local target
local downloads=~/Downloads local downloads=~/Downloads
mkdir -p "$downloads"
find_unused "$drive" find_unused "$drive"
target="$unused" target="$unused"
if [ -z "$unused" ]; then if [ -z "$unused" ]; then

View File

@ -5,6 +5,9 @@ function dev_from_partnum()
local drive="$1" local drive="$1"
local partnum="$2" local partnum="$2"
partition="$drive""$partnum" partition="$drive""$partnum"
until [ -b "$drive"1 ] || [ -b "$drive"p1 ]; do
sleep 1
done
if [ ! -b "$partition" ]; then if [ ! -b "$partition" ]; then
partition="$drive"p"$partnum" partition="$drive"p"$partnum"
if [ ! -b "$partition" ]; then if [ ! -b "$partition" ]; then
@ -49,7 +52,6 @@ function install_syslinux()
dd bs=440 count=1 conv=notrunc \ dd bs=440 count=1 conv=notrunc \
if=/usr/lib/syslinux/mbr/gptmbr.bin of="$drive" if=/usr/lib/syslinux/mbr/gptmbr.bin of="$drive"
sync sync
sleep 5
mount_efi "$drive" mount_efi "$drive"