Skip to content

Commit 28a0bfc

Browse files
committed
Simple fixes and additions
1 parent c33579a commit 28a0bfc

File tree

3 files changed

+210
-152
lines changed

3 files changed

+210
-152
lines changed

CreateImage.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if ! [ $(id -u) = 0 ]; then
2020
# https://github.com/balena-io/balena-cli/blob/master/INSTALL.md#executable-installer
2121
# If the downloaded and unzipped folder is in download ($HOME/Downloads/balena-cli) then :
2222
export PATH=$PATH:$HOME/Downloads/balena-cli #Allows script environment to understand where Balena Etcher CLI is
23-
23+
if false; then
2424
echo "The fully configured source SD card should be plugged in to continue"
2525
read -p "When ready, input version number : " NUM
2626
dd status=progress if=/dev/sde of=$HOME/MovitImages/Movit-unshrunk$NUM.img
@@ -31,13 +31,13 @@ echo ""
3131
read -p "Press enter when target SD card is inserted"
3232
echo "Flashing new image on inserted SD card..."
3333
balena local flash $HOME/MovitImages/Movit_V$NUM.img.gz -y --drive /dev/sde
34-
34+
fi
3535
echo -e "\nConfiguring wpa_supplicant for the first boot with the flashed SD card"
3636
read -p " Enter SSID: " SSID
3737
read -p " Enter password: " PSK
3838

3939
read -p "Remove and reinsert the card and press enter"
40-
cd /media/charles/boot/ && cat << EOF > wpa_supplicant.conf
40+
cat << EOF > /media/charles/boot/wpa_supplicant.conf
4141
country=CA
4242
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
4343
update_config=1
@@ -47,5 +47,10 @@ network={
4747
psk="$PSK" #Remplacer MOT_DE_PASSE par le mot de passe de celui-ci
4848
id_str="AP1"
4949
}
50-
EOF && cat wpa_supplicant.conf
50+
EOF
51+
52+
echo -e "\n#####################################\nWritten file :\n#####################################"
53+
cat /media/charles/boot/wpa_supplicant.conf
54+
echo -e "#####################################\nExiting..."
55+
5156
exit 0

0 commit comments

Comments
 (0)