Skip to content
Snippets Groups Projects
Commit b1ab6f00 authored by Oussama Ghorbel's avatar Oussama Ghorbel
Browse files

this script can guess if an update is needed for a intel packages

the script compares intel specific packages that are found in this
feed in two different UGW version
parent 859108e9
No related branches found
No related tags found
No related merge requests found
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment