forked from Swirt/typertools-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_mac.sh
More file actions
55 lines (41 loc) · 1.19 KB
/
install_mac.sh
File metadata and controls
55 lines (41 loc) · 1.19 KB
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
#!/bin/sh
set -e
cat << EOF
Photoshop extension Typer Tools v1.4.9 will be installed.
Close Photoshop (if it is open).
EOF
read -n 1 -p "Press any key to continue"
echo
SRCDIR=$(cd "$(dirname "$0")" && pwd)
is_preferences_domain_exists() {
defaults read "$1" > /dev/null 2> /dev/null
}
for version in {6..12}; do
if is_preferences_domain_exists com.adobe.CSXS.${version} ; then
defaults write com.adobe.CSXS.${version} PlayerDebugMode 1
fi
done
killall -u `whoami` csprefsd > /dev/null 2> /dev/null || true
DESTDIR="${HOME}/Library/Application Support/Adobe/CEP/extensions/typertools"
if [ -e "${DESTDIR}/storage" ]; then
cp "${DESTDIR}/storage" "${SRCDIR}/__storage"
fi
if [ -e "${DESTDIR}" ]; then
rm -rf "${DESTDIR}"
fi
mkdir -p "${DESTDIR}"
for item in app CSXS icons locale .debug; do
if [ -e "${SRCDIR}/${item}" ]; then
cp -rf "${SRCDIR}/${item}" "${DESTDIR}/${item}"
fi
done
if [ -e "${SRCDIR}/__storage" ]; then
cp -f "${SRCDIR}/__storage" "${DESTDIR}/storage"
rm -f "${SRCDIR}/__storage"
fi
cat << EOF
Installation completed.
Open Photoshop and in the menu click the following: [Window] > [Extensions] > [Typer Tools]
EOF
read -n 1 -p "Press Enter to continue"
echo