|  |  |  | @ -15,6 +15,12 @@ function sendMail() { | 
		
	
		
			
				|  |  |  |  |   echo "He encontrado resultados en $1" | mailx -r alertascpds@56k.es -s "Alertas CPDs - Resultados en $2" $notificationEmails | 
		
	
		
			
				|  |  |  |  | } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | function testNotification() { | 
		
	
		
			
				|  |  |  |  |   comunidad="TestLand" | 
		
	
		
			
				|  |  |  |  |   pdfURL="https://ejemplo.com/de/url/que/no/existe.pdf" | 
		
	
		
			
				|  |  |  |  |   sendMail $pdfURL $comunidad | 
		
	
		
			
				|  |  |  |  | } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | function aragon { | 
		
	
		
			
				|  |  |  |  |   echo "nada aún realizado. Aquí código para buscar en aragon" | 
		
	
		
			
				|  |  |  |  |   comunidad="Aragon" | 
		
	
	
		
			
				
					|  |  |  | @ -56,12 +62,14 @@ function help { | 
		
	
		
			
				|  |  |  |  |   echo "--barcelona Alertas en Barcelona" | 
		
	
		
			
				|  |  |  |  |   echo "--clamancha Alertas en Castilla-La Mancha" | 
		
	
		
			
				|  |  |  |  |   echo "--madrid Alertas en Madrid" | 
		
	
		
			
				|  |  |  |  |   echo "--test Test de Notificación Email" | 
		
	
		
			
				|  |  |  |  |   echo -e "--help Muesta la ayuda\n" | 
		
	
		
			
				|  |  |  |  | } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | function checkOpt { | 
		
	
		
			
				|  |  |  |  |   if [ -z "$opt" ]; then help; fi | 
		
	
		
			
				|  |  |  |  |   if [ "$opt" = "--help" ]; then help; fi | 
		
	
		
			
				|  |  |  |  |   if [ "$opt" = "--test" ]; then testNotification; fi | 
		
	
		
			
				|  |  |  |  |   if [ "$opt" = "--aragon" ]; then aragon; fi | 
		
	
		
			
				|  |  |  |  |   if [ "$opt" = "--barcelona" ]; then barcelona; fi | 
		
	
		
			
				|  |  |  |  |   if [ "$opt" = "--clamancha" ]; then clamancha; fi | 
		
	
	
		
			
				
					|  |  |  | 
 |