forked from Bitmessage/sysdeploy
fix: sleeping and missing ~/Downloads folder
This commit is contained in:
parent
e102469a54
commit
b69f341b89
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user