Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
copyToRelease-code.sh 1.18 KiB
#!/bin/sh

# script to copy update jars from their staging area to the releases area




if [ -z "${1}" ] 
then 

echo ""
echo "    Need an argument"
echo "        Usage: ${0} <stream>"
echo "        where <stream> is one of Europa, Callisto"
echo ""
exit 




elif [ "${1}" = "Europa" ] 
then 
	fromDir=${HOME}/downloads/webtools/declaredUpdates
	toDir=${HOME}/downloads/webtools/milestones

elif [ "${1}" = "Callisto" ] 
then
	fromDir=${HOME}/downloads/webtools/testUpdates
	toDir=${HOME}/downloads/webtools/updates

else
	echo ""
	echo "    Unrecognized argument: ${1}" 
	echo "        Usage: ${0} <stream>"
	echo "        where <stream> is one of Europa, Callisto"
	echo ""
	exit
fi 


if [ "${2}" != "-doit" ] ; then
   echo ""
   echo "    This is a dry run. Add -doit to actually copy"
   echo ""
   doit="--dry-run"
else
   doit=""
fi

echo ""
echo "    Copying new plugins and features "
echo "        from  ${fromDir}"
echo "          to  ${toDir}"
echo ""

rsync ${doit}  --ignore-existing -rv ${fromDir}/features ${toDir}
rsync ${doit}  --ignore-existing -rv ${fromDir}/plugins ${toDir}

if [ "${doit}" = "--dry-run" ] ; then
   echo "    This was a dry run. Add -doit to actually copy"
fi