mirror of
https://bitbucket.org/gwenhael/pine64-slackware.git
synced 2024-12-26 09:58:23 +01:00
safety checks
This commit is contained in:
parent
3667c8f09c
commit
c339ac835c
1 changed files with 9 additions and 0 deletions
|
@ -11,11 +11,20 @@ SD_MOUNT_POINT=$2
|
|||
[ "x$1" == "x" ] && display_usage && exit
|
||||
[ "x$2" == "x" ] && display_usage && exit
|
||||
|
||||
if $(df | grep /$ | grep -q "^$SD_DEV"); then
|
||||
echo "Target and current system device are the same. Can't do that!"
|
||||
exit
|
||||
fi
|
||||
|
||||
SIMPLEIMAGE_VERSION=${SIMPLEIMAGE_VERSION:-"latest"}
|
||||
LINUX_VERSION=${LINUX_VERSION:-"latest"}
|
||||
SLACKWARE_VERSION=${SLACKWARE_VERSION:-"14.2"}
|
||||
SLACKWARE_MINIROOTFS_VERSION=${SLACKWARE_MINIROOTFS_VERSION:-"01Jul16"}
|
||||
|
||||
echo "Going further will wipe ${SD_DEV} and you _will_ lose all data on it !"
|
||||
echo "/!\\ LAST CHANCE TO HIT Ctrl-C /!\\"
|
||||
read
|
||||
|
||||
wget -c https://www.stdin.xyz/downloads/people/longsleep/pine64-images/simpleimage-pine64-${SIMPLEIMAGE_VERSION}.img.xz
|
||||
unxz simpleimage-pine64-${SIMPLEIMAGE_VERSION}.img.xz
|
||||
dd if=simpleimage-pine64-${SIMPLEIMAGE_VERSION}.img of=$SD_DEV bs=1024
|
||||
|
|
Loading…
Reference in a new issue