mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			533 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			533 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| DIR=`pwd`
 | |
| 
 | |
| 
 | |
| exifup(){
 | |
| 	PREVIEW_DIR=$1
 | |
| 	if [ -e "$PREVIEW_DIR" ] ; then
 | |
| 		echo doing: `pwd`
 | |
| 		exiv2 ex *.psd
 | |
| 		mv *.exv "$PREVIEW_DIR"
 | |
| 		cd "$PREVIEW_DIR"
 | |
| 		exiv2 -k in *.jpg
 | |
| 		rm -f *.exv
 | |
| 		cd ..
 | |
| 	fi
 | |
| 	true
 | |
| }
 | |
| 
 | |
| # XXX this does not support absolute paths...
 | |
| if [[ $1 != "" ]] ; then
 | |
| 	if ! [ -d "$1" ] ; then
 | |
| 		echo "\"$1\": is not a directory."
 | |
| 		exit 1
 | |
| 	fi
 | |
| 	cd "./$1/DCIM/"
 | |
| 	exifup ./preview/
 | |
| 	exifup ./hi-res/
 | |
| 	cd "$DIR"
 | |
| else
 | |
| 	for d in */DCIM/ ; do
 | |
| 		cd "./$d"
 | |
| 		exifup ./preview/
 | |
| 		exifup ./hi-res/
 | |
| 		cd "$DIR"
 | |
| 	done
 | |
| fi
 |