Skip to content

Instantly share code, notes, and snippets.

@KhasMek
Created May 31, 2012 16:31
Show Gist options
  • Save KhasMek/2844595 to your computer and use it in GitHub Desktop.
Save KhasMek/2844595 to your computer and use it in GitHub Desktop.
wtf
if [ -f .repo/local_manifest.xml ]; then
echo "local manifest already present."
echo "merging with kernel manifest for safety."
cat platform_manifest/kernel_manifest.xml | while read line
do
kernel=`grep "$line" .repo/local_manifest.xml`
if [ -z "$kernel" ]; then
echo " $line" >> .repo/local_manifest.xml
fi
done
# Fix the formatting
grep -Ev "^</manifest>" .repo/local_manifest.xml > .repo/local_manifest.new
echo "</manifest>" >> .repo/local_manifest.new
mv .repo/local_manifest.new .repo/local_manifest.xml
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment