-
Notifications
You must be signed in to change notification settings - Fork 3
/
fuji_profile_hack.sh
67 lines (58 loc) · 2.24 KB
/
fuji_profile_hack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
set -e
# Colors
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
# Clear console
clear
# Warning
echo "${red}This will work on MacOS"
echo "I'm not responsible for any damages on your system"
echo "If Adobe change where the folder is located, this script will fail"
echo "This will make a back-up of the original Fujifilm X-T4 folder${reset}"
echo "Do you want to continue?"
echo "Type ${green}yes${reset} or ${red}no${reset}: "
read answ
if [ $answ = "no" ]; then
echo "Will exit now"
exit 0
else
sleep 1
fi
# Clear console
clear
# Check if script is run as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Backup of folder
echo "Doing a BackUp of Fujifilm X-T4 folder"
cd /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Resources/Settings/Adobe/Profiles/Camera/Fujifilm/
cp -r Fujifilm\ X-T4/ ~/Desktop/Fujifilm\ X-T4\ BackUp/
echo ""
sleep 5
# Make changes
echo "Changing xmp files"
cd /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Resources/Settings/Adobe/Profiles/Camera/Fujifilm/Fujifilm\ X-T4/
sed -i -e 's/crs:CameraModelRestriction="Fujifilm X-T4"/crs:CameraModelRestriction=""/1' Fujifilm\ X-T4\ Camera\ BLEACH\ BYPASS.xmp
sed -i -e 's/crs:CameraModelRestriction="Fujifilm X-T4"/crs:CameraModelRestriction=""/1' Fujifilm\ X-T4\ Camera\ CLASSIC\ Neg.xmp
sed -i -e 's/crs:CameraModelRestriction="Fujifilm X-T4"/crs:CameraModelRestriction=""/1' Fujifilm\ X-T4\ Camera\ Sepia.xmp
rm *.xmp-e
echo ""
sleep 5
# Done
if [ $(cat Fujifilm\ X-T4\ Camera\ BLEACH\ BYPASS.xmp | grep 'CameraModelRestriction') = 'crs:CameraModelRestriction=""' ]; then
echo "${green}ALL DONE${reset}"
else
echo "Something went wrong"
echo "Restoring old folder"
cd /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Resources/Settings/Adobe/Profiles/Camera/Fujifilm/
rm -r Fujifilm\ X-T4/
cd ~/Desktop/
cp -r Fujifilm\ X-T4\ BackUp/ /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Resources/Settings/Adobe/Profiles/Camera/Fujifilm/
cd /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/Resources/Settings/Adobe/Profiles/Camera/Fujifilm/
mv Fujifilm\ X-T4\ BackUp/ Fujifilm\ X-T4/
echo "Restored !!"
fi