Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Adobe CS Back-up Tool
- # Copyright ©2012, David Koff for the J. Paul Getty Trust
- #
- # ---------------------------------------------------------------------------
- # 1. Force quits any open Adobe application
- # 2. Backs up key folders of ANY version of Photoshop, Illustrator, InDesign
- # 3. Limited to the "workstation" account
- # ---------------------------------------------------------------------------
- #----------------------------------------------------------
- # Variables
- #----------------------------------------------------------
- #-----Assignments
- SCRIPTNAME=$0
- user405=ard
- #--- Set Logging
- exec >> "/Library/Logs/Getty Installations.log" 2>&1
- #-----Directories & Files
- backup="/Users/workstation/AdobeBackup"
- prefs="/Users/workstation/Library/Preferences/"
- il="/Applications/Adobe Illustrator"
- id="/Applications/Adobe InDesign"
- ps="/Applications/Adobe Photoshop"
- #-----Array
- cs=( CS3 CS4 CS5 CS5.5 CS6 ) # use of array allows us to add later releases
- # ---------------------------------------------------------
- # timestamp
- # ---------------------------------------------------------
- echo " "
- echo "###################################"
- echo "########## Beginning Log ##########"
- echo "##### Adobe CS backup Script ######"
- echo "#### `date "+%A %m/%d/%Y %H:%M"` #####"
- echo "###################################"
- echo " "
- # ---------------------------------------------------------
- # Forcequit Any Adobe Processes
- # ---------------------------------------------------------
- pid=`ps -ax | grep Adobe | cut -c 1-5`
- kill $pid
- # ---------------------------------------------------------
- # the actual backup
- # ---------------------------------------------------------
- for i in "${cs[@]}"
- do
- if [ -d "$il $i" ]; then
- echo "Illustrator $i exists, now backing up to $backup
- mkdir -p $backup/Illustrator\ $i
- cp -Rpv "$il $i/Plug-ins.localized" $backup/Illustrator\ $i/
- cp -Rpv "$il $i/Presets.localized" $backup/Illustrator\ $i/
- cp -Rpv $prefs/Adobe\ Illustrator\ $i\ Settings "$backup/Illustrator $i/"
- else
- echo "No install of Illustrator $i exists.
- fi
- if [ -d "$ps $i" ]; then
- echo "Photoshop $i exists, now backing up to $backup
- mkdir -p $backup/Photoshop\ $i
- cp -Rpv "$ps $i/Plug-ins" $backup/Photoshop\ $i/
- cp -Rpv "$ps $i/Presets" $backup/Photoshop\ $i/
- cp -Rpv $prefs/Adobe\ Photoshop\ $i\ Settings "$backup/Photoshop $i/"
- else
- echo "No install of Photoshop $i exists.
- fi
- if [ -d "$id $i" ]; then
- echo "InDesign $i exists, now backing up to $backup
- mkdir -p $backup/InDesign\ $i
- cp -Rpv "$id $i/Plug-ins" $backup/InDesign\ $i/
- cp -Rpv "$id $i/Presets" $backup/InDesign\ $i/
- cp -Rpv $prefs/Adobe\ InDesign "$backup/InDesign $i/"
- else
- echo "No install of InDesign $i exists.
- fi
- echo "
- done
- # make back-up folder editable by user
- if [ -d $backup ]; then #OK
- echo "backup folder exists."
- chown -R workstation:staff $backup #OK
- else
- echo "no backup folder to change."
- fi
- # ---------------------------------------------------------
- # timestamp
- # ---------------------------------------------------------
- echo " "
- echo "###################################"
- echo "########## End of Log ##########"
- echo "#### `date "+%A %m/%d/%Y %H:%M"` ####"
- echo "###################################"
- echo "
- open -a Console /Library/Logs/Getty\ Installations.log ## opens log for fieldtech to examine
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement