mirror of
				https://github.com/Jonny007-MKD/OTR-DecodeAll
				synced 2025-11-03 16:15:36 +01:00 
			
		
		
		
	Switch argument -v: validated. New default: Don't validate otrkeys
This commit is contained in:
		
							parent
							
								
									8d1eba545c
								
							
						
					
					
						commit
						043337f9a2
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		
							
								
								
									
										14
									
								
								otrDecodeAll
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								otrDecodeAll
									
									
									
									
									
								
							| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
remove=1;				# 1 => Delete when torrent deleted, 2 => Delete always, 0 => Delete never
 | 
					remove=1;				# 1 => Delete when torrent deleted, 2 => Delete always, 0 => Delete never
 | 
				
			||||||
forceRun=0;				# Skip lock file test
 | 
					forceRun=0;				# Skip lock file test
 | 
				
			||||||
validate="";			# unused
 | 
					validate="-q";			# unused with pyropeters otrtool
 | 
				
			||||||
logMsgTypes=("      " "error" "warn" "info" "debug" "debugV")
 | 
					logMsgTypes=("      " "error" "warn" "info" "debug" "debugV")
 | 
				
			||||||
logMsgColor=("\033[37m" "\033[31m" "\033[33m" "\033[37m" "\033[37m" "\033[37m")
 | 
					logMsgColor=("\033[37m" "\033[31m" "\033[33m" "\033[37m" "\033[37m" "\033[37m")
 | 
				
			||||||
logLevel=0
 | 
					logLevel=0
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ function funcPerformChecks {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Parse the parameters
 | 
					# Parse the parameters
 | 
				
			||||||
function funcParam {
 | 
					function funcParam {
 | 
				
			||||||
	while getopts "frkqh?e:p:i:o:d:t:" optval; do
 | 
						while getopts "frkvh?e:p:i:o:d:t:" optval; do
 | 
				
			||||||
		case $optval in
 | 
							case $optval in
 | 
				
			||||||
			"f")
 | 
								"f")
 | 
				
			||||||
				funcLog 4 "Set forceRun = 1"
 | 
									funcLog 4 "Set forceRun = 1"
 | 
				
			||||||
| 
						 | 
					@ -77,9 +77,9 @@ function funcParam {
 | 
				
			||||||
			"k")
 | 
								"k")
 | 
				
			||||||
				funcLog 4 "Set remove = 0 (never)"
 | 
									funcLog 4 "Set remove = 0 (never)"
 | 
				
			||||||
				remove=0;;				# keep the otrkey
 | 
									remove=0;;				# keep the otrkey
 | 
				
			||||||
			"q")
 | 
								"v")
 | 
				
			||||||
				funcLog 4 "Set validate = -q (never)"
 | 
									funcLog 4 "Set validate = '' (yes)"
 | 
				
			||||||
				validate="-q";;			# validate the output file after decoding. Not needed when downloaded via torrent
 | 
									validate="";;			# validate the output file after decoding. Not needed when downloaded via torrent
 | 
				
			||||||
			"e")
 | 
								"e")
 | 
				
			||||||
				funcLog 4 "Set user = $OPTARG"
 | 
									funcLog 4 "Set user = $OPTARG"
 | 
				
			||||||
				user=$OPTARG;;			# different user
 | 
									user=$OPTARG;;			# different user
 | 
				
			||||||
| 
						 | 
					@ -111,7 +111,7 @@ function funcParam {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Print some help text and explain parameters
 | 
					# Print some help text and explain parameters
 | 
				
			||||||
function funcHelp {
 | 
					function funcHelp {
 | 
				
			||||||
	echo -e "\n\033[1;31m./otrDecodeAll.sh [-f -k -q -h] [-e user] [-p password] [-i inputDir] [-d decodedDir] [-c delugeDir] [-o outputDir]\033[0;37m"
 | 
						echo -e "\n\033[1;31m./otrDecodeAll.sh [-f -k -v -h] [-e user] [-p password] [-i inputDir] [-d decodedDir] [-c delugeDir] [-o outputDir]\033[0;37m"
 | 
				
			||||||
	echo "-> FORCE"
 | 
						echo "-> FORCE"
 | 
				
			||||||
	echo -e "	\033[36m-f\033[37m Make this script ignore the lockfile. This may result into decoding some files multiple times."
 | 
						echo -e "	\033[36m-f\033[37m Make this script ignore the lockfile. This may result into decoding some files multiple times."
 | 
				
			||||||
	echo "-> REMOVE"
 | 
						echo "-> REMOVE"
 | 
				
			||||||
| 
						 | 
					@ -119,7 +119,7 @@ function funcHelp {
 | 
				
			||||||
	echo "-> KEEP"
 | 
						echo "-> KEEP"
 | 
				
			||||||
	echo -e "	\033[36m-k\033[37m Make this script keep the original otrkey files. If not given, the otrkey will be kept after decoding and when torrent file is not found."
 | 
						echo -e "	\033[36m-k\033[37m Make this script keep the original otrkey files. If not given, the otrkey will be kept after decoding and when torrent file is not found."
 | 
				
			||||||
	echo "-> NO VALIDATE"
 | 
						echo "-> NO VALIDATE"
 | 
				
			||||||
	echo -e "	\033[36m-q\033[37m Make otrdecoder not validating the output file. This should be ok when you downloaded it via torrent."
 | 
						echo -e "	\033[36m-v\033[37m Make otrdecoder validate the output file. This should not be neccessarry when you downloaded it via torrent."
 | 
				
			||||||
	echo "-> USER"
 | 
						echo "-> USER"
 | 
				
			||||||
	echo -e "	\033[36m-e\033[37m Specify the OTR email address if you do not want to use the default."
 | 
						echo -e "	\033[36m-e\033[37m Specify the OTR email address if you do not want to use the default."
 | 
				
			||||||
	echo "-> PASSWORD"
 | 
						echo "-> PASSWORD"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue