Last active
December 19, 2015 00:29
-
-
Save andrewkolesnikov/5869452 to your computer and use it in GitHub Desktop.
CQ5 content migration from author instance to dev instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example: install_pkg.sh /etc/packages/my_packages/Auctions-Data.zip /etc/packages/my_packages/news-video-for-dev.zip /etc/packages/deployment/i18n-PRDbundle.zip) | |
src_name="foo" | |
src_password="bar" | |
src_host="athmir1.ny.sothebys.com:4502" | |
dest_name="admin" | |
dest_password="admin" | |
dest_host="localhost:4502" | |
for package_name in $*; do | |
echo "" | |
# echo "Rebuilding source package $package_name..." | |
# curl -v -u $src_name:$src_password -X POST http://$src_host/crx/packmgr/service/.json$package_name?cmd=build | |
echo "Downloading package $package_name..." | |
curl -v -u $src_name:$src_password http://$src_host$package_name > ${package_name##*/} | |
echo "Uploading and installing package $package_name" | |
curl -v -u $dest_name:$dest_password -F file=@"${package_name##*/}" -F name='$package_name' -F force=true -F install=true http://$dest_host/crx/packmgr/service.jsp | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment