This repository was archived by the owner on Jul 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpackMacApps
More file actions
executable file
·51 lines (44 loc) · 1.38 KB
/
packMacApps
File metadata and controls
executable file
·51 lines (44 loc) · 1.38 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
#!/bin/csh -f
# Script to package fortran graphics programs in individual .app directories
# Sadly, also does some install tasks needed for install without dist
#
# $Id$
#
# get the install directory and copy .version to VERSION unconditionally
#
set instdir = `sed -n '/INSTDIR/s/^.*= *//p' configure`
\cp .version $instdir/VERSION
# Copy the system templates
\rm -rf SystemTemplate
mkdir -p SystemTemplate
set templates = `\find dist -name '*.adoc' -print`
if ($#templates > 0) then
foreach i ($templates)
\cp $i SystemTemplate
end
endif
#
# Get the list of programs needing packaging
#
set fprogs = `sed -n '/MACAPPS/s/^.*= *//p' configure`
if ($#fprogs == 0) exit 0
if ($fprogs[1] == "") exit 0
#
# get the sendevent contents directory
#
set imsecont = qttools/sendevent/imodsendevent.app/Contents
#
# Loop on programs, copy PkgInfo, and Info.plist with possible name change
#
foreach prog ($fprogs)
if (-e $instdir/bin/$prog) then
set contents = $instdir/bin/${prog}.app/Contents
if (! -e $contents/MacOS) mkdir -p $contents/MacOS
\cp $imsecont/PkgInfo $contents
if (-e $imsecont/Info.plist) then
sed "/imodsendevent/s//$prog/" < $imsecont/Info.plist > $contents/Info.plist
endif
\mv $instdir/bin/$prog $contents/MacOS
if (-e $instdir/bin/run$prog) \mv $instdir/bin/run$prog $instdir/bin/$prog
endif
end