-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcopyToInstaller.sh
executable file
·30 lines (22 loc) · 1.13 KB
/
copyToInstaller.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
#!/bin/sh
#set -x # uncomment for a trace
cd build/Release
if test "`ls FanControlDaemon 2>&1 | sed -e '/^FanControlDaemon$/d'`" -o \
"`ls -d 'Fan Control.prefPane' 2>&1 | sed -e '/^Fan Control\.prefPane$/d'`" -o \
"`ls -d 'Fan Control.prefPane' 2>&1 | sed -e '/^Fan Control\.prefPane$/d'`"
then
echo 'copyToInstaller.sh must be run from the Release directory containing the'
echo '"FanControlDaemon", "Fan Control.prefPane" and "StartupParameters.plist" files'
exit 1
fi
echo
/bin/echo -n 'Copying to Installer directories ... '
/bin/cp FanControlDaemon '../../installer/Library/StartupItems/FanControlDaemon/'
/bin/rm -rf 'installer/Library/PreferencePanes/Fan Control.prefPane'
/bin/cp -R 'Fan Control.prefPane' '../../installer/Library/PreferencePanes/'
cd ../../
/usr/sbin/chown -R root:wheel 'installer/Library/StartupItems/FanControlDaemon/'
/bin/chmod 755 'installer/Library/StartupItems/FanControlDaemon/FanControlDaemon'
/bin/chmod 644 'Installer/Library/StartupItems/FanControlDaemon/StartupParameters.plist'
/usr/sbin/chown -R root:wheel 'installer/Library/PreferencePanes/Fan Control.prefPane'
echo 'completed'