forked from sneak/hacks
rename dir
This commit is contained in:
31
fix-raspian-defaults/01-install-to-boot.sh
Executable file
31
fix-raspian-defaults/01-install-to-boot.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die {
|
||||
echo "$1" > /dev/stderr
|
||||
exit 1
|
||||
}
|
||||
|
||||
function info {
|
||||
echo "$1" > /dev/stderr
|
||||
}
|
||||
|
||||
function doinstall {
|
||||
# assumes osx
|
||||
[[ "$(uname -s)" != "Darwin" ]] && die "need osx"
|
||||
|
||||
TARGET="/Volumes/boot"
|
||||
|
||||
if [[ ! -e "$TARGET/LICENCE.broadcom" ]]; then
|
||||
die "cant find rpi boot dir"
|
||||
else
|
||||
info "rpi boot dir found at $TARGET"
|
||||
fi
|
||||
|
||||
info "disabling partition resize"
|
||||
sed -i '' -e 's/init=[^[:space:]]*//' "$TARGET/cmdline.txt"
|
||||
|
||||
info "copying setup files to disk"
|
||||
|
||||
}
|
||||
|
||||
doinstall
|
||||
Reference in New Issue
Block a user