Skip to content

Instantly share code, notes, and snippets.

@andrewkolesnikov
Last active December 19, 2015 00:29
Show Gist options
  • Save andrewkolesnikov/5869452 to your computer and use it in GitHub Desktop.
Save andrewkolesnikov/5869452 to your computer and use it in GitHub Desktop.
CQ5 content migration from author instance to dev instance
#!/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