|
|
@ -13,6 +13,7 @@ |
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
#set -xv |
|
|
|
|
|
|
|
#Description: Creates an iso from selected config(s) |
|
|
|
|
|
|
@ -91,23 +92,16 @@ while [ $# -gt 0 ]; do |
|
|
|
shift |
|
|
|
done |
|
|
|
|
|
|
|
if [ ! -x tmp/gaffitter/gaffitter ] ; then |
|
|
|
echo ; date "+ [%X] Creating GAFFitter ..." |
|
|
|
rm -rf tmp/gaffitter; mkdir -p tmp/gaffitter |
|
|
|
cp -a src/gaffitter/* tmp/gaffitter/ |
|
|
|
make -C tmp/gaffitter -s |
|
|
|
fi |
|
|
|
|
|
|
|
# Check Configs |
|
|
|
# |
|
|
|
dirs= |
|
|
|
for cfg in "$cfgs" ; do |
|
|
|
for cfg in $cfgs ; do |
|
|
|
if [ ! -f config/"$cfg"/config ]; then |
|
|
|
echo "Not a valid config: "$cfg"" |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
for cfg in "$cfgs" ; do |
|
|
|
for cfg in $cfgs ; do |
|
|
|
id="$( grep '^export SDECFG_ID=' config/"$cfg"/config | cut -f2 -d"'" 2> /dev/null)" |
|
|
|
if [ ! -f build/"$id"/TOOLCHAIN/isofs.txt ]; then |
|
|
|
echo "Not a valid build: "$cfg"" |
|
|
@ -117,5 +111,29 @@ for cfg in "$cfgs" ; do |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
# Create directory structure |
|
|
|
# Do stuff |
|
|
|
# |
|
|
|
wantfiles= |
|
|
|
grafts=`mktemp` |
|
|
|
#pathes=`mktemp` |
|
|
|
wantfiles=$( echo "$dirs" | grep '^DISK1\|^SPLIT' | gawk '{print($2)}' | xargs -I xxx find xxx -true ) |
|
|
|
|
|
|
|
for file in $wantfiles; do |
|
|
|
mfileline=$( echo "$file" | gawk -F/ '{print $NF}' ) |
|
|
|
dirline=$( echo "$file" | gawk -F/ '{$NF=""; NF--; print}' | sed -e 's|\ |\/|g') |
|
|
|
cdline=$( echo "$dirs" | grep "$dirline" | grep -v 'EVERY' | gawk '{print $3}' ) |
|
|
|
graftline="$cdline$mfileline=$file" |
|
|
|
echo $graftline >> $grafts |
|
|
|
# echo $dirline >> $pathes |
|
|
|
done |
|
|
|
|
|
|
|
out_size=$(echo "$wantfiles" | xargs mkisofs -quiet -print-size -V 0000 -graft-points) |
|
|
|
out_size=$( gawk 'BEGIN {printf("%d",'$out_size'*2048)}' ) |
|
|
|
x=$(gawk 'BEGIN {print ('$out_size' > '$size') ? "true" : "false" }') |
|
|
|
if $x; then |
|
|
|
exit 1 |
|
|
|
else |
|
|
|
set -xv |
|
|
|
mkisofs -r -T -J -l -A "OpenSDE - Disk 1" -publisher 'OpenSDE System Develop Environment - http://www.opensde.org' -graft-points -path-list $grafts -o file.iso |
|
|
|
set +xv |
|
|
|
fi |