Skip to content

Instantly share code, notes, and snippets.

@enru
Created February 25, 2011 19:28
Show Gist options
  • Select an option

  • Save enru/844346 to your computer and use it in GitHub Desktop.

Select an option

Save enru/844346 to your computer and use it in GitHub Desktop.
copies a magento aheadworks or mageworx extension into magento
# first cd into aheadworks or mageworx extension dir
# (this assumes it's been unzipped into magento's root dir)
for x in `find step_*`; do
y=`echo $x | awk '{ sub("step_[0-9]+/", ""); print "../"$0; }'`;
if [ -d "$x" ] && ! [ -e "$y" ] ; then mkdir -p $y; fi;
if [ -f "$x" ]; then cp $x $y; fi;
done
@enru

enru commented Nov 10, 2011

Copy link
Copy Markdown
Author
for x in `find extension`; do 
 y=`echo $x | awk '{ sub("extension/", ""); print "../"$0; }'`;
 if [ -d "$x" ] && ! [ -e "$y" ] ; then mkdir -p $y; fi;
 if [ -f "$x" ]; then cp $x $y; fi; 
done

@enru

enru commented Mar 6, 2014

Copy link
Copy Markdown
Author

for x in find pos-magento-api-1.3.5; do
y=echo $x | awk '{ sub("pos-magento-api-1.3.5/", ""); print "../"$0; }';
if [ -d "$x" ] && ! [ -e "$y" ] ; then mkdir -p $y; fi;
if [ -f "$x" ]; then cp $x $y; fi;
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment