Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/vendors/deb/debianization.sh | ||
---|---|---|
exit 1
|
||
fi
|
||
|
||
NAMES=(freenetis freenetis-monitoring freenetis-redirection freenetis-ulogd freenetis-ssh-keys)
|
||
CONFIG="./debianization.conf"
|
||
|
||
if [ -r $CONFIG ]; then
|
||
echo "Loading configuration file"
|
||
. $CONFIG
|
||
fi
|
||
|
||
NAMES=(freenetis freenetis-monitoring freenetis-redirection freenetis-dhcp \
|
||
freenetis-ssh-keys freenetis-qos)
|
||
DEBIANS=(lenny squeeze wheezy)
|
||
VERSION=$1
|
||
|
||
... | ... | |
|
||
# call all debianization utils #################################################
|
||
|
||
root_dir=`pwd`
|
||
|
||
for name in ${NAMES[*]}
|
||
do
|
||
name_mod=`echo $name | sed 's/-/_/g'`
|
||
for debian in ${DEBIANS[*]}
|
||
do
|
||
deb_sh=./$name/debianization.sh
|
||
|
||
if [ -f "$deb_sh" ]; then
|
||
./$deb_sh "$VERSION" "$debian"
|
||
# get dir from config or default
|
||
conf_var_name="${name_mod}_debianization"
|
||
eval_str="echo \${${conf_var_name}}"
|
||
deb_dir_sh=`eval "$eval_str"`
|
||
if [[ -z "$deb_dir_sh" ]]; then
|
||
deb_dir_sh="./$name/"
|
||
fi
|
||
|
||
deb_sh="$deb_dir_sh/debianization.sh"
|
||
|
||
if [ $? -eq 0 ]; then
|
||
# run debianization
|
||
if [ -f "$deb_sh" ]; then
|
||
cd "$deb_dir_sh"
|
||
./debianization.sh "$VERSION" "$debian"
|
||
|
||
if [ $? -eq 0 ]; then
|
||
green_echo ">>>> [$name+$debian] debianized"
|
||
else
|
||
# move builded packages
|
||
if [ -d "deb_packages" ]; then
|
||
mkdir -p "$root_dir/deb_packages"
|
||
mv -f deb_packages/* "$root_dir/deb_packages"
|
||
fi
|
||
else
|
||
red_echo ">>>> [$name+$debian] an error occured during debianization"
|
||
fi
|
||
else
|
||
fi
|
||
|
||
cd "$root_dir"
|
||
else
|
||
red_echo ">>>> [$name+$debian] not debianized (debianization utility is missing)"
|
||
fi
|
||
done
|
||
fi
|
||
done
|
||
done
|
||
|
Také k dispozici: Unified diff
Release 1.1.0