forked from OpenXT/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·78 lines (65 loc) · 2.22 KB
/
install
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
74
75
76
77
78
#!/bin/sh -e
#
# Copyright (c) 2014 Citrix Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Installs the collection of files that make up the OpenXT host installer.
if [ $# -ne 2 -o \( "$1" != "part1" -a "$1" != "part2" \) ] ; then
echo "Usage: `basename $0` PART DESTDIR" >&2
echo "Installs part PART of the installer under DESTDIR" >&2
exit 1
fi
PART=$1
DESTDIR=$2
if [ ${PART} = "part1" ] ; then
install -d ${DESTDIR}
install -d ${DESTDIR}/answers
install -m 644 answers/*.ans ${DESTDIR}/answers/
install -d ${DESTDIR}/answers/doc
install -m 644 answers/doc/* ${DESTDIR}/answers/doc/
chmod 755 answers/doc/add-repository-to-initrd.sh
PARTDESTDIR=${DESTDIR}/${PART}
SCRIPTS="autostart-main autostart-status"
else
PARTDESTDIR=${DESTDIR}
SCRIPTS="run upgrade"
fi
install -d ${PARTDESTDIR}
install -m 755 common/run-graph ${PARTDESTDIR}/
for i in ${SCRIPTS} ; do
install -m 755 ${PART}/$i ${PARTDESTDIR}/
done
install -d ${PARTDESTDIR}/config
for i in common/config/* ${PART}/config/* ; do
if [ -f $i ] ; then
install -m 644 $i ${PARTDESTDIR}/config/
fi
done
install -d ${PARTDESTDIR}/stages
for i in common/stages/* ${PART}/stages/* ; do
if [ -f $i ] ; then
install -m 755 $i ${PARTDESTDIR}/stages/
fi
done
chmod 644 ${PARTDESTDIR}/stages/functions
chmod 644 ${PARTDESTDIR}/stages/*.graph
install -d ${PARTDESTDIR}/stages/Functions
for i in common/stages/Functions/* ${PART}/stages/Functions/* ; do
if [ -f $i ] ; then
install -m 644 $i ${PARTDESTDIR}/stages/Functions/
fi
done