Commits

Jack Frost committed 21b644a Merge

Merge branch 'local'
Added an option to remove some things from the resulting archive

Comments (0)

Files changed (1)

 	miner.unzip -o "$zip0" || { return 1; }
 	miner.unzip -o "$zip1" || { return 1; }
 	rm "$zip0" || { return 1; }
+	for i in "${rmlist[@]}"; do
+			miner.msg "Removing ${i}..."
+			rm -r "$i"
+	done
 	miner.zip -r "$zip0" . || { return 1; }
 }
 
 	rm -r "$tmpdir"
 }
 
-while getopts "h" option; do
+while getopts "hr:" option; do
 	case "$option" in
+		r) rmlist+=( "$OPTARG" );;
 		h|?|*) miner.usage; exit 3;;
 	esac
 done
 
-[[ "$OPTIND" ]] && { shift $[OPTIND-1]; }
+[[ "$OPTIND" ]] && { shift $((OPTIND-1)); }
+
+echo "${rmlist[@]}"
+echo "args: $@"
 
 [[ "$1" ]] || { miner.usage; exit 1; }
 [[ "$2" ]] || { miner.usage; exit 1; }