Skip to content

Instantly share code, notes, and snippets.

@perlDreamer
Created February 24, 2010 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlDreamer/313777 to your computer and use it in GitHub Desktop.
Save perlDreamer/313777 to your computer and use it in GitHub Desktop.
#!/bin/bash
#for file in `find ../packages-7.8.0 -name '*wgpkg' -print`; do \
for file in `find ../packages-7.8.{0,1,2,3,4,5,6,7,8,9,10,11,12,13} -name '*wgpkg' -print`; do \
tar zxf $file; \
for json in *.json; do \
mv -- $json `perl -ne 'print $1 if /assetId. : .(\S{22})/;' -- $json`.pkg;
done
done
for file in *.pkg; do \
#echo -- $file `perl -ne 'print $1 if /lineage. : .(\d+)/;' -- $file`.json;
mv -- $file `perl -ne 'print $1 if /lineage. : .(\d+)/;' -- $file`.json;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment