forked from jamf/NetSUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CreateNetSUSInstaller.sh
executable file
·59 lines (46 loc) · 1.96 KB
/
CreateNetSUSInstaller.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
#!/bin/bash
# This script generates a new Appliance Installer
timeEcho() {
echo $(date "+[%Y-%m-%d %H:%M:%S]: ") "$1"
}
alias md5='md5 -r'
alias md5sum='md5 -r'
echo ""
timeEcho "Building NetSUSLP Installer..."
# Clean-up old files
rm -f NetSUSInstaller.run 2>&1 > /dev/null
rm -Rf temp 2>&1 > /dev/null
mkdir temp
cp -R base temp
cp -R NetBoot temp
cp -R SUS temp
cp -R webadmin temp
cp -R LDAPProxy temp
cp -R includes/* temp/base/
cp -R includes/* temp/NetBoot/
cp -R includes/* temp/SUS/
cp -R includes/* temp/webadmin/
cp -R includes/* temp/LDAPProxy/
if [ -x /usr/bin/xattr ]; then find temp -exec xattr -c {} \; ;fi # Remove OS X extended attributes
find temp -name .DS_Store -delete # Clean out .DS_Store files
find temp -name .svn | xargs rm -Rf # Clean out SVN garbage
# Generate NetBoot App sub-installer
timeEcho "Creating NetBoot sub-installer..."
bash makeself/makeself.sh temp/NetBoot/ temp/base/netbootInstall.run "NetBoot Installer" "bash netbootInstall.sh" > /dev/null
# Generate SUS sub-installer
timeEcho "Creating SUS sub-installer..."
bash makeself/makeself.sh temp/SUS/ temp/base/susInstall.run "SUS Installer" "bash susInstall.sh" > /dev/null
# Generate webadmin sub-installer
timeEcho "Creating webadmin sub-installer..."
bash makeself/makeself.sh temp/webadmin/ temp/base/webadminInstall.run "WebAdmin Installer" "bash webadminInstall.sh" > /dev/null
# Generate LDAP Proxy sub-installer
timeEcho "Creating LDAP Proxy sub-installer..."
bash makeself/makeself.sh temp/LDAPProxy/ temp/base/LDAPProxyInstall.run "LDAP Proxy Installer" "bash LDAPProxyInstall.sh" > /dev/null
# Generate final installer
timeEcho "Creating final installer..."
bash makeself/makeself.sh temp/base/ NetSUSLPInstaller.run "NetSUSLP Installer" "bash NetSUSInstaller.sh"
timeEcho "Cleaning up..."
#cp temp/*/*.run . # Uncomment this if you want to test the sub-installers outside of the main installer
rm -Rf temp 2>&1 > /dev/null
timeEcho "Finished creating the NetSUS Installer. "
exit 0