-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
- Loading branch information
xtruthx
authored and
Marco van Wieringen
committed
Feb 17, 2015
1 parent
7faa133
commit 39c671c
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
#This is a script for automatically downloading winbareos packages from | ||
# the repo and creating new opsi packages | ||
#daniel.neuberger@dass-it.de, 14.02.2013 | ||
|
||
#obs repo url | ||
url=http://obs.dass-it/winbareos/SLE_11_SP2/noarch/ | ||
|
||
#deleting of the existing .exe binarys | ||
rm -f /home/opsiproducts/bareos/CLIENT_DATA/data/winbareos-*.*.exe | ||
|
||
#get an index.html for listing available files | ||
wget $url | ||
|
||
#fetching of the needed binary names | ||
cat index.html | cut -s -d ">" -f 3 index.html | grep -o winbareos-*.*.*-*-bit-r*.*.exe >packages.txt | ||
|
||
#cat index.html.1 | grep -o winbareos-*.*.*-*-bit-r*.*.exe | sed 's/...................................$//'>packages.txt | ||
|
||
#download the .exe files | ||
for a in `cat packages.txt` ; do | ||
|
||
wget -P /home/opsiproducts/bareos/CLIENT_DATA/data/ $url$a | ||
|
||
done | ||
|
||
#auto configuration for the setup.ins | ||
cat packages.txt | sed 's/-/ /g' | while read name version arch bit release ; | ||
do | ||
cd /home/opsiproducts/bareos/CLIENT_DATA/ | ||
sed -i -e's/Set $ProductVer$ = "*.*.*"/Set $ProductVer$ = "'$version'"/g' -e's/Set $ReleaseVer$ = "*.*.*"/Set $ReleaseVer$ = "'$release'"/g' setup3264.ins | ||
done | ||
|
||
#building opsi packages | ||
cd /home/opsiproducts/ | ||
opsi-makeproductfile -qv bareos | ||
|
||
opsi-package-manager -i -qv bareos_*.opsi | ||
|
||
#deleting of helpfiles | ||
cd | ||
rm index.html | ||
rm packages.txt |