From 4afea78531c887849ba1eeb26186b15775e79d4c Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Wed, 29 Apr 2020 19:06:39 +0200 Subject: [PATCH] Solved multiple bugs --- .gitignore | 2 +- sd_setup.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 93e9d82..8b13789 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -ArchLinuxARM-rpi-*-latest.tar.gz + diff --git a/sd_setup.sh b/sd_setup.sh index 2501bc2..87efde8 100644 --- a/sd_setup.sh +++ b/sd_setup.sh @@ -24,13 +24,13 @@ fi echo "Configure user..." echo "Please type in a valid username from which the SSH-Key should be copied:" read -r origin_username; -getent passwd "$origin_username" > /dev/null 2 || echo "User $origin_username doesn't exist. Abord program." && exit 1; +getent passwd "$origin_username" > /dev/null 2 || (echo "User $origin_username doesn't exist. Abord program." && exit 1); origin_user_home="/home/$origin_username/"; echo "Image routine starts..." -image_folder="$origin_user_home/Images/"; +image_folder="$origin_user_home""Images/"; echo "The images will be stored in \"$image_folder\"." -if [ ! -d "$DIR" ]; then +if [ ! -d "$image_folder" ]; then echo "Folder \"$image_folder\" doesn't exist. It will be created now." mkdir -v "$image_folder" fi @@ -120,7 +120,7 @@ if [ ! -f "$image_path" ] if [ ! -f "$image_path" ] then echo "Image \"$imagename\" gets downloaded from \"$download_url\"..." - wget "$download_url" + wget "$download_url" -P "$image_folder" fi fi