diff --git a/ugw-differ.sh b/ugw-differ.sh new file mode 100755 index 0000000000000000000000000000000000000000..135bdd1bc145991d35cd5cc365ec4176492203f2 --- /dev/null +++ b/ugw-differ.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +help() { +cat <<END +Run this script from intel feed directory +Extract the UGW SDK and configure it for your initial and target version +Define and export the variables environments INITIAL_UGW and TARGET_UGW +They need to point to the openwrt directory from the initial and target UGW +example: +export INITIAL_UGW=/home/xxx/devel/shelob/ugw-8.4.1.30/UGW-8.4.1.30-SW-CD/ugw_sw/openwrt +export TARGET_UGW=/home/xxx/devel/shelob/UGW-8.4.1.50-SW-CD/ugw_sw/openwrt +./ugw-differ.sh + +You still need however to check for uboot and kernel manually +END +} + +[ -z "$INITIAL_UGW" ] && help && exit +[ -z "$TARGET_UGW" ] && help && exit + +echo "INITIAL_UGW=$INITIAL_UGW" +echo "TARGET_UGW=$TARGET_UGW" +echo + +need_update="" +meld="" + +for d in *; do + [ ! -d $d ] && continue + + initial=`find $INITIAL_UGW/package -name $d` + target=`find $TARGET_UGW/package -name $d` + + echo "checking for update for the package $d" + + if [ -z "$initial" ]; then + echo "package $d is not found in the intial ugw version" + fi + + if [ -z "$target" ]; then + echo "package $d is not found in the target ugw version" + fi + + if [ -z $initial ] || [ -z $target ]; then + continue + fi + + diff=`diff -r $initial $target 2>&1` + if [ -n "$diff" ]; then + meld="${meld}meld $initial $target $d\n" + need_update="$need_update $d" + fi +done + +echo +echo "The following packages potentially need update:" +echo "$need_update" + +echo +echo "Printing meld commands: (may be you find them handy)" +echo -e $meld