2012-02-01 12:46:37 +01:00
|
|
|
##############################################################################
|
|
|
|
# This optional file "builder-targets-cb.sh" will be called by builder.sh
|
|
|
|
#
|
|
|
|
# The targets will be called from thde opsi-builder using the following
|
|
|
|
# order: config, prepare, retrieve, create, package, publish, commit, cleanup
|
|
|
|
# You can overwrite the target functions in builder-targets-cb.sh
|
|
|
|
#
|
|
|
|
# You can define callback functions. The functions are called from
|
|
|
|
# opsi-builder within processing a target
|
|
|
|
# cb_package_makeproductfile
|
|
|
|
#
|
|
|
|
# You can use every variable defined in any configuration file or by
|
|
|
|
# the defined builder script itself. Also, calling the predefined
|
|
|
|
# targets builder_<targetname> is possible.
|
|
|
|
#
|
|
|
|
# Abstract:
|
|
|
|
# target order: config, prepare, retrieve, create, package, publish, commit, cleanup
|
|
|
|
# callbacks: <none>
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
function cleanup() {
|
2012-02-06 19:30:54 +01:00
|
|
|
echo "Cleanup"
|
|
|
|
builder_cleanup
|
2012-02-01 12:46:37 +01:00
|
|
|
}
|
2013-09-18 14:16:47 +02:00
|
|
|
|
|
|
|
function create() {
|
|
|
|
echo "Create"
|
|
|
|
builder_create
|
|
|
|
|
2016-08-27 15:05:01 +02:00
|
|
|
### X86
|
2013-09-18 14:16:47 +02:00
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/X86/Addons/bundles
|
|
|
|
# mv $INST_DIR/CLIENT_DATA/X86/Addons/bundles/*.xpi $INST_DIR/CLIENT_DATA/X86/Addons/bundles
|
|
|
|
|
|
|
|
pushd $INST_DIR/CLIENT_DATA/X86/Addons/bundles
|
2016-08-27 15:05:01 +02:00
|
|
|
for file in `ls *.xpi*`
|
2013-09-18 14:16:47 +02:00
|
|
|
do
|
2016-08-27 15:05:01 +02:00
|
|
|
dirname=`echo $file|sed 's/\.xpi.*$//g'`
|
|
|
|
echo $dirname
|
2013-09-18 14:16:47 +02:00
|
|
|
mkdir $dirname
|
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/X86/Addons/bundles/$dirname $INST_DIR/CLIENT_DATA/X86/Addons/bundles/$file
|
|
|
|
done
|
|
|
|
popd
|
2016-08-27 15:05:01 +02:00
|
|
|
rm $INST_DIR/CLIENT_DATA/X86/Addons/bundles/*.xpi*
|
2013-09-18 14:16:47 +02:00
|
|
|
|
2016-08-27 15:05:01 +02:00
|
|
|
### X86_64
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles
|
|
|
|
# mv $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles/*.xpi $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles
|
|
|
|
|
|
|
|
pushd $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles
|
|
|
|
for file in `ls *.xpi*`
|
|
|
|
do
|
|
|
|
dirname=`echo $file|sed 's/\.xpi.*$//g'`
|
|
|
|
echo $dirname
|
|
|
|
mkdir $dirname
|
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/X86_64/Addons/bundles/$dirname $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles/$file
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
rm $INST_DIR/CLIENT_DATA/X86_64/Addons/bundles/*.xpi*
|
|
|
|
|
|
|
|
### ALL
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/ALL/Addons/bundles
|
|
|
|
# mv $INST_DIR/CLIENT_DATA/ALL/Addons/bundles/*.xpi $INST_DIR/CLIENT_DATA/ALL/Addons/bundles
|
|
|
|
|
|
|
|
pushd $INST_DIR/CLIENT_DATA/ALL/Addons/bundles
|
|
|
|
for file in `ls *.xpi*`
|
|
|
|
do
|
|
|
|
dirname=`echo $file|sed 's/\.xpi.*$//g'`
|
|
|
|
echo $dirname
|
|
|
|
mkdir $dirname
|
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/ALL/Addons/bundles/$dirname $INST_DIR/CLIENT_DATA/ALL/Addons/bundles/$file
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
rm $INST_DIR/CLIENT_DATA/ALL/Addons/bundles/*.xpi*
|
|
|
|
|
|
|
|
### Extensions
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/ALL/Addons/extensions
|
|
|
|
# mv $INST_DIR/CLIENT_DATA/ALL/Addons/extensions/*.xpi $INST_DIR/CLIENT_DATA/ALL/Addons/extensions
|
2013-09-18 14:16:47 +02:00
|
|
|
|
2016-08-27 15:05:01 +02:00
|
|
|
pushd $INST_DIR/CLIENT_DATA/ALL/Addons/extensions
|
|
|
|
for file in `ls *.xpi*`
|
2013-09-18 14:16:47 +02:00
|
|
|
do
|
2016-08-27 15:05:01 +02:00
|
|
|
dirname=`echo $file|sed 's/\.xpi.*$//g'`
|
|
|
|
echo $dirname
|
2013-09-18 14:16:47 +02:00
|
|
|
mkdir $dirname
|
2016-08-27 15:05:01 +02:00
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/ALL/Addons/extensions/$dirname $INST_DIR/CLIENT_DATA/ALL/Addons/extensions/$file
|
2013-09-18 14:16:47 +02:00
|
|
|
done
|
|
|
|
popd
|
2016-08-27 15:05:01 +02:00
|
|
|
rm $INST_DIR/CLIENT_DATA/ALL/Addons/extensions/*.xpi*
|
2013-09-18 14:16:47 +02:00
|
|
|
}
|