This is very close to the SO How to extract only a specific folder from a zipped archive to a given directory? I need something close but I always get the folder with the contents, not it's contents only This is what was suggested:
#note $2 is passed in and would be == "magefoler"
unzip /srv/file.zip "$2-master/*" -d /srv/www/mage/
What I need to do it to take a zip that has this structure in it
file.zip
|-magefoler-master/
|-magefoler-master/app/*tons of files
|-magefoler-master/skin/*tons of files
and I need to move it to another folder but, I can't move the magefoler, I only want the app and skin folders. This doesn't mean that it'll always be those two folders, just that any child content, files or folders, in the magefoler is what I need to get out. What is trying to be avoided is to export all to a folder and then just move it from there.
The end result I'm looking for is from the zip file I output to the /mage folder like this:
/srv/www/mage/
|--/mage/app/*tons of files
|--/mage/skin/*tons of files