@@ -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 :
2222export PATH=$PATH :$HOME /Downloads/balena-cli # Allows script environment to understand where Balena Etcher CLI is
23-
23+ if false ; then
2424echo " The fully configured source SD card should be plugged in to continue"
2525read -p " When ready, input version number : " NUM
2626dd status=progress if=/dev/sde of=$HOME /MovitImages/Movit-unshrunk$NUM .img
@@ -31,13 +31,13 @@ echo ""
3131read -p " Press enter when target SD card is inserted"
3232echo " Flashing new image on inserted SD card..."
3333balena local flash $HOME /MovitImages/Movit_V$NUM .img.gz -y --drive /dev/sde
34-
34+ fi
3535echo -e " \nConfiguring wpa_supplicant for the first boot with the flashed SD card"
3636read -p " Enter SSID: " SSID
3737read -p " Enter password: " PSK
3838
3939read -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
4141country=CA
4242ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
4343update_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+
5156exit 0
0 commit comments