-
Notifications
You must be signed in to change notification settings - Fork 6
/
copypkg-mac.sh
executable file
·74 lines (62 loc) · 1.67 KB
/
copypkg-mac.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
68
69
70
71
72
73
#!/bin/sh
# copypkg-mac.sh - copy ultrascan3 directories to pkg/ultrascan3
ME=`whoami`
RSYNC="rsync -av --exclude=.svn"
SRCDIR=$us3
SOMOBASE=$us3/us_somo
PKGDIR=`(cd $us3/../pkg;pwd)`
PDIRS=""
SYSTYPE=`uname -s`
if [ "${SYSTYPE}" != "Darwin" ]; then
echo "$0 requires a SYSTYPE (uname -s) of \"Darwin\""
echo " SYSTYPE=${SYSTYPE}"
exit 1
fi
for D in ultrascan3 somo Frameworks; do
DDIR=${PKGDIR}/${D}
if [ ! -d ${DDIR} ]; then
mkdir ${DDIR}
fi
PDIRS="${PDIRS} ${DDIR}"
done
echo "Enter Admin password --"
sudo chown -R $ME:admin ${PDIRS}
DDIR=${PKGDIR}/ultrascan3
for D in Developer etc bin lib; do
SDIR=${SRCDIR}/${D}
echo "${RSYNC} ${SDIR} ${DDIR}"
${RSYNC} ${SDIR} ${DDIR}
done
chmod g+w ${DDIR}/etc
# Remove any somo*prev* files in etc/
rm -f ${PKGDIR}/etc/somo*prev*
if [ -d ${PKGDIR}/somo/demo ]; then
# Clear out somo/demo so only present contents are copied
/bin/rm -rf ${PKGDIR}/somo/demo/*
fi
# Copy somo demo
SBASE=${SOMOBASE}/somo
SDIR=${SBASE}/demo
DDIR=${PKGDIR}/ultrascan3/somo
echo "${RSYNC} ${SDIR} ${DDIR}"
${RSYNC} ${SDIR} ${DDIR}
# Copy somo doc
SDIR=${SBASE}/doc
echo "${RSYNC} ${SDIR} ${DDIR}"
${RSYNC} ${SDIR} ${DDIR}
/bin/rm -rf ${PKGDIR}/somo/doc/manual/attic
SDIR=${SRCDIR}/Frameworks
DDIR=${PKGDIR}
echo "${RSYNC} ${SDIR} ${DDIR}"
${RSYNC} ${SDIR} ${DDIR}
##FRLIST=`(cd ${SRCDIR}/Frameworks;ls|grep framework)`
##cd ${PKGDIR}/ultrascan3/lib
##for F in ${FRLIST}; do ln -s ../Frameworks/$F .;done
cd ${PKGDIR}
/bin/rm -rf ultrascan3/somo/develop ultrascan3/somo/*.pl
pwd
find ./ -name '.svn' | xargs rm -Rf
echo "find ./ -name '.svn' -print"
find ./ -name '.svn' -print
echo "(Possibly) Enter Admin password --"
sudo chown -R root:admin ${PDIRS}