Last active
March 2, 2021 15:52
-
-
Save danijeljw/7676f9b14a4123aa92c8 to your computer and use it in GitHub Desktop.
Lightroom Image Import Prep v0.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Lightroom Image Import Prep v0.2 | |
| todayDate="$(date +'%Y%m%d')" | |
| sdCard=$"/Volumes/EOS_Digital/DCIM/100CANON/*" | |
| newDir=$"$HOME/Desktop/$todayDate" | |
| if [ -d "/$HOME/Desktop/$todayDate" ]; then | |
| echo "Folder exists, manual import" | |
| exit 0 | |
| fi | |
| /bin/mkdir $HOME/Desktop/$todayDate | |
| /bin/cp $sdCard $newDir | |
| cd $newDir | |
| for x in *_MG*.CR2 | |
| do mv $x $(echo $x | sed -e 's/_MG/_IMG/') | |
| done | |
| for i in * | |
| do mv "$i" "$todayDate$i" | |
| done | |
| exit 0 | |
| # diskutil erasevolume HFS+ “ramdisk” `hdiutil attach -nomount ram://2097152` | |
| $ cd /Volumes/EOS_DIGITAL/DCIM/100CANON | |
| # if [ -d "$HOME/Desktop" ]; then | |
| # | |
| # fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment