Skip to content

Commit

Permalink
Add set -eu to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Jul 9, 2019
1 parent 444c91b commit 9e600a5
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LCD-hdmi
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

dev=`grep -rn "Option" /usr/share/X11/xorg.conf.d/99-fbturbo.conf | grep "fbdev" |awk -F\" '{printf $4}'`
if test "$dev" = "/dev/fb0";then
echo "The system is already output for HDMI and does not need to be set up any more"
Expand Down
2 changes: 2 additions & 0 deletions LCD24-3A+-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions LCD24-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions LCD28-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions LCD32-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions LCD35-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions LCD5-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
Expand Down
2 changes: 2 additions & 0 deletions LCD7B-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
Expand Down
2 changes: 2 additions & 0 deletions LCD7C-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
Expand Down
3 changes: 3 additions & 0 deletions MHS24-show
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp ./usr/mhs24-overlay.dtb /boot/overlays/
Expand Down
2 changes: 2 additions & 0 deletions MHS32-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions MHS35-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
2 changes: 2 additions & 0 deletions MHS40-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
Expand Down
3 changes: 3 additions & 0 deletions MIS35-show
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp ./usr/mis35-overlay.dtb /boot/overlays/
Expand Down
3 changes: 3 additions & 0 deletions MPI3508-show
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

hw_version=`tr -d '\0' < /proc/device-tree/model`
Expand Down
3 changes: 3 additions & 0 deletions MPI3508_480_320-show
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt
if [ -b /dev/mmcblk0p7 ]; then
Expand Down
3 changes: 3 additions & 0 deletions MPI3510-show
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

sudo cp -rf ./boot/config-35DPI.txt /boot/config.txt
#sudo cp ./usr/bcm2709-rpi-2-b.dtb /boot/
#sudo cp ./usr/bcm2710-rpi-3-b.dtb /boot/
Expand Down
2 changes: 2 additions & 0 deletions MPI4008-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
Expand Down
2 changes: 2 additions & 0 deletions MPI5001-show
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eu

sudo ./system_backup.sh

root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
Expand Down
3 changes: 3 additions & 0 deletions rotate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

cur_dir=`pwd`
if [ ! -f $cur_dir/.have_installed ]; then
echo "Please install the LCD driver first"
Expand Down
3 changes: 3 additions & 0 deletions system_backup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

if [ ! -d "./.system_backup" ]; then
sudo mkdir ./.system_backup
fi
Expand Down
3 changes: 3 additions & 0 deletions system_restore.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

set -eu

#Just finished the system, no need to restore
if [ ! -d "./.system_backup" ]; then
echo "The system is the original version and does not need to be restored"
Expand Down

0 comments on commit 9e600a5

Please sign in to comment.