Add bash strict options.
This commit is contained in:
		
							
								
								
									
										3
									
								
								backup
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								backup
									
									
									
									
									
								
							| @@ -1,2 +1,5 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| rsync -aAXv --delete "$1" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/media/music/*"} "$2" | ||||
|   | ||||
							
								
								
									
										3
									
								
								clearmem
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								clearmem
									
									
									
									
									
								
							| @@ -1,2 +1,5 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| sync && echo 1 > /proc/sys/vm/drop_caches | ||||
|   | ||||
| @@ -1,2 +1,5 @@ | ||||
| #!/bin/sh | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| install -m 755 $1 $HOME/.local/bin | ||||
|   | ||||
| @@ -1,4 +1,7 @@ | ||||
| #!/bin/sh | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| [ "$#" -eq 0 ] && | ||||
| 	echo "Requires a command. Run with 'help' for a list of commands." && | ||||
| 	exit 1 | ||||
|   | ||||
							
								
								
									
										2
									
								
								setbg
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setbg
									
									
									
									
									
								
							| @@ -1,5 +1,7 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| if [ $# -gt 1 ] | ||||
| then | ||||
| 	echo "Too many arguments" | ||||
|   | ||||
| @@ -1,4 +1,6 @@ | ||||
| #!/bin/sh | ||||
| #!/bin/bash | ||||
|  | ||||
| set -euo pipefail | ||||
|  | ||||
| # TODO: | ||||
| #  - Add options for port | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -eu | ||||
| set -euo pipefail | ||||
|  | ||||
| CAMERA_DEVICE="" | ||||
| MOUNT_DIR="/tmp/camera-mount" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user