-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCreatePatchServer.sh
executable file
·46 lines (37 loc) · 1.65 KB
/
CreatePatchServer.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
#!/bin/bash
# This script generates a new Patch Server Installer
timeEcho() {
echo $(date "+[%Y-%m-%d %H:%M:%S]: ") "$1"
}
alias md5='md5 -r'
alias md5sum='md5 -r'
echo ""
timeEcho "Building Patch Server Installer..."
# Clean-up old files
rm -f KinobiInstaller.run 2>&1 > /dev/null
rm -f PatchServerInstaller.run 2>&1 > /dev/null
rm -Rf temp 2>&1 > /dev/null
#mkdir temp
mkdir -p temp/installer/checks
mkdir -p temp/installer/resources
mkdir -p temp/installer/utils
cp -R base/PatchInstaller.sh temp/installer/install.sh
cp -R base/test64bitRequirements.sh temp/installer/checks/test64bitRequirements.sh
cp -R base/testNetSUSRequirements.sh temp/installer/checks/testNetSUSRequirements.sh
cp -R base/testOSRequirements.sh temp/installer/checks/testOSRequirements.sh
cp -R includes/logger.sh temp/installer/utils/logger.sh
cp -R patchserver/patchInstall.sh temp/installer/install-patch_v1.sh
cp -R patchserver/var/Slim temp/installer/resources/Slim
cp -R patchserver/var/appliance/db/patch_v1.sqlite temp/installer/resources/patch_v1.sqlite
cp -R patchserver/var/appliance/LICENSE temp/installer/resources/LICENSE
cp -R patchserver/var/www temp/installer/resources/html
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 final installer
timeEcho "Creating final installer..."
bash makeself/makeself.sh temp/installer/ KinobiInstaller.run "Patch Server Installer" "bash install.sh"
timeEcho "Cleaning up..."
rm -Rf temp 2>&1 > /dev/null
timeEcho "Finished creating the Patch Server Installer. "
exit 0