Hi
I've made some shell scripts for our samba server to automatically
generate the package download entries for our environment which is
configured like this:
1. [wpkg] samba share pointing to /usr/wpkg, where wpkg.js is located.
2. pkg directory in [wpkg] share where every package gets its own
directory. e.g. Acrobat Reader is in [wpkg]\pkg\acrobat
3. Soft linked /usr/wpkg/pkg to Apaches DocumentRoot/pkg, so you can
get packages like this: http://apache/pkg/acrobat/[filename.ext]
4. Made an Unix shell script called md5gen.sh which can be called in
/usr/wpkg/pkg. This will output XML for use in packages.xml for every
package in this directory. It will do some kind of paging with the
output so you can cut&paste it into the right place in the packages.xml
file. Further automation can be done by automatically generating the
whole packages.xml (maybe by having standard install.js scripts in every
package or thelike to allow standard <install> cmds). The urlprefix
variable in md5gen.sh should point to your URL prefix for the package
download urls.
--[md5gen.sh]-----------8<-----------------------------------------------
#!/bin/sh
# generate WPKG xml code for downloading files
urlprefix="http://www.mikisoft.com/pkg"
for packname in *; do
echo "Package: $packname"
echo
cd $packname
for i in * ; do
sum=`md5 -q "$i"`
echo "<file name=\"$i\" timeout=\"600\" md5=\"$sum\">"
echo " <source url=\"$urlprefix/$packname/$i\" />"
echo "</file>"
done
cd -
echo -n "Show next entry? <Enter>=Yes <Ctrl>+<c>=No "
echo
read bla
done
------------------------------------------------->8---------------------
Hope its useful for someone. :)
Greets,
Andre
begin:vcard
fn:Andre Ilie
n:Ilie;Andre
org:Photonic Sense GmbH;IT NOC
adr:;;Am Goldberg 3;Eisenach;TH;99817;Germany
email;internet:[EMAIL PROTECTED]
title:Systemadministration
tel;work:+49 3691 73 18 0
tel;fax:+49 3691 73 18 79
note:I haven't lost my mind, it's backed up on tape somewhere....
x-mozilla-html:FALSE
url:http://www.photonic-sense.com/
version:2.1
end:vcard