Use Unix line delimiters for shell scripts
Change-Id: Ic40136f0dcbef3ade9e64e4b688de8a8da8abae0
diff --git a/releng/org.eclipse.emf.compare.releng/.project b/releng/org.eclipse.emf.compare.releng/.project
index b708fef..04d241b 100644
--- a/releng/org.eclipse.emf.compare.releng/.project
+++ b/releng/org.eclipse.emf.compare.releng/.project
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.emf.compare.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.emf.compare.releng</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/releng/org.eclipse.emf.compare.releng/publish-milestone.sh b/releng/org.eclipse.emf.compare.releng/publish-milestone.sh
index cb17901..9daf161 100644
--- a/releng/org.eclipse.emf.compare.releng/publish-milestone.sh
+++ b/releng/org.eclipse.emf.compare.releng/publish-milestone.sh
@@ -1,93 +1,93 @@
-#!/bin/sh
-# ====================================================================
-# Copyright (c) 2021 Obeo
-# This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License 2.0
-# which accompanies this distribution, and is available at
-# https://www.eclipse.org/legal/epl-2.0
-#
-# Contributors:
-# Obeo - initial API and implementation
-# ====================================================================
-
-# Exit on error
-set -e
-
-# The SSH account to use
-export SSH_ACCOUNT="genie.emfcompare@projects-storage.eclipse.org"
-
-NIGHTLIES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/nightly"
-MILESTONES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/milestones"
-DROPS_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/downloads/drops"
-ZIP_PREFIX="emf-compare-update-"
-GROUP="modeling.emfcompare"
-
-if [[ ! ${QUALIFIER} =~ ^[0-9]\.[0-9]\.[0-9]+\.[0-9]{12}$ ]]
-then
- echo "$QUALIFIER doesn't match the expect format x.x.x.yyyyMMddhhmm"
- exit 1
-fi
-
-if ssh ${SSH_ACCOUNT} "[ ! -d ${NIGHTLIES_FOLDER}/${QUALIFIER} ]"
-then
- echo "couldn't find build with qualifier $QUALIFIER in the promoted nightlies"
- exit 1
-fi
-
-echo "promoting build $QUALIFIER as milestone $ALIAS"
-
-IFS=. read MAJOR MINOR MICRO TIMESTAMP <<<"${QUALIFIER}"
-
-VERSION_SHORT=${MAJOR}.${MINOR}
-VERSION=${MAJOR}.${MINOR}.${MICRO}
-
-UPDATE_ROOT_COMPOSITE=false
-if ssh ${SSH_ACCOUNT} "[ ! -d ${MILESTONES_FOLDER}/${VERSION_SHORT} ]"
-then
- UPDATE_ROOT_COMPOSITE=true
-fi
-
-ssh ${SSH_ACCOUNT} << EOSSH
- if ${UPDATE_ROOT_COMPOSITE}
- then
- mkdir -p ${MILESTONES_FOLDER}/${VERSION_SHORT}
- chgrp ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}
- fi
-
- ## copy the nightly to its "milestones" location
- cp -r ${NIGHTLIES_FOLDER}/${QUALIFIER} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
- chgrp -R ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
-
- ## Create a compressed archive of this repository and place it in the drops folder
- if [ ! -d ${DROPS_FOLDER}/${VERSION} ]
- then
- mkdir -p ${DROPS_FOLDER}/${VERSION}
- chgrp ${GROUP} ${DROPS_FOLDER}/${VERSION}
- fi
-
- mkdir -p ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}
- pushd ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
- zip -2 -r ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip *
- popd
- md5sum ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip > ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip.md5
- chgrp -R ${GROUP} ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}
-
- ## Create the p2.index file for this milestone
-cat <<EOF >${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}/p2.index
-version = 1
-metadata.repository.factory.order = compositeContent.xml,\!
-artifact.repository.factory.order = compositeArtifacts.xml,\!
-EOF
- chgrp -R ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}/p2.index
-EOSSH
-
-## Update the composite update site with this new child
-
-#cd ${MILESTONES_FOLDER}/${VERSION_SHORT}
-#/shared/common/apache-ant-latest/bin/ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=S${TIMESTAMP}
-
-#if [ "$UPDATE_ROOT_COMPOSITE" = true ]
-#then
-# cd ${MILESTONES_FOLDER}
-# /shared/common/apache-ant-latest/bin/ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=${VERSION_SHORT}
+#!/bin/sh
+# ====================================================================
+# Copyright (c) 2021 Obeo
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0
+#
+# Contributors:
+# Obeo - initial API and implementation
+# ====================================================================
+
+# Exit on error
+set -e
+
+# The SSH account to use
+export SSH_ACCOUNT="genie.emfcompare@projects-storage.eclipse.org"
+
+NIGHTLIES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/nightly"
+MILESTONES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/milestones"
+DROPS_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/downloads/drops"
+ZIP_PREFIX="emf-compare-update-"
+GROUP="modeling.emfcompare"
+
+if [[ ! ${QUALIFIER} =~ ^[0-9]\.[0-9]\.[0-9]+\.[0-9]{12}$ ]]
+then
+ echo "$QUALIFIER doesn't match the expect format x.x.x.yyyyMMddhhmm"
+ exit 1
+fi
+
+if ssh ${SSH_ACCOUNT} "[ ! -d ${NIGHTLIES_FOLDER}/${QUALIFIER} ]"
+then
+ echo "couldn't find build with qualifier $QUALIFIER in the promoted nightlies"
+ exit 1
+fi
+
+echo "promoting build $QUALIFIER as milestone $ALIAS"
+
+IFS=. read MAJOR MINOR MICRO TIMESTAMP <<<"${QUALIFIER}"
+
+VERSION_SHORT=${MAJOR}.${MINOR}
+VERSION=${MAJOR}.${MINOR}.${MICRO}
+
+UPDATE_ROOT_COMPOSITE=false
+if ssh ${SSH_ACCOUNT} "[ ! -d ${MILESTONES_FOLDER}/${VERSION_SHORT} ]"
+then
+ UPDATE_ROOT_COMPOSITE=true
+fi
+
+ssh ${SSH_ACCOUNT} << EOSSH
+ if ${UPDATE_ROOT_COMPOSITE}
+ then
+ mkdir -p ${MILESTONES_FOLDER}/${VERSION_SHORT}
+ chgrp ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}
+ fi
+
+ ## copy the nightly to its "milestones" location
+ cp -r ${NIGHTLIES_FOLDER}/${QUALIFIER} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
+ chgrp -R ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
+
+ ## Create a compressed archive of this repository and place it in the drops folder
+ if [ ! -d ${DROPS_FOLDER}/${VERSION} ]
+ then
+ mkdir -p ${DROPS_FOLDER}/${VERSION}
+ chgrp ${GROUP} ${DROPS_FOLDER}/${VERSION}
+ fi
+
+ mkdir -p ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}
+ pushd ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}
+ zip -2 -r ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip *
+ popd
+ md5sum ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip > ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}/${ZIP_PREFIX}${ALIAS}.zip.md5
+ chgrp -R ${GROUP} ${DROPS_FOLDER}/${VERSION}/S${TIMESTAMP}
+
+ ## Create the p2.index file for this milestone
+cat <<EOF >${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}/p2.index
+version = 1
+metadata.repository.factory.order = compositeContent.xml,\!
+artifact.repository.factory.order = compositeArtifacts.xml,\!
+EOF
+ chgrp -R ${GROUP} ${MILESTONES_FOLDER}/${VERSION_SHORT}/S${TIMESTAMP}/p2.index
+EOSSH
+
+## Update the composite update site with this new child
+
+#cd ${MILESTONES_FOLDER}/${VERSION_SHORT}
+#/shared/common/apache-ant-latest/bin/ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=S${TIMESTAMP}
+
+#if [ "$UPDATE_ROOT_COMPOSITE" = true ]
+#then
+# cd ${MILESTONES_FOLDER}
+# /shared/common/apache-ant-latest/bin/ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=${VERSION_SHORT}
#fi
\ No newline at end of file
diff --git a/releng/org.eclipse.emf.compare.releng/publish-nightly.sh b/releng/org.eclipse.emf.compare.releng/publish-nightly.sh
index d75fe5a..ee5137c 100644
--- a/releng/org.eclipse.emf.compare.releng/publish-nightly.sh
+++ b/releng/org.eclipse.emf.compare.releng/publish-nightly.sh
@@ -1,88 +1,88 @@
-#!/bin/sh
-# ====================================================================
-# Copyright (c) 2021 Obeo
-# This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License 2.0
-# which accompanies this distribution, and is available at
-# https://www.eclipse.org/legal/epl-2.0
-#
-# Contributors:
-# Obeo - initial API and implementation
-# ====================================================================
-
-if [ ${REFERENCE_TARGET_PLATFORM} != ${PLATFORM} ]; then
- exit 1
-fi
-
-# Exit on error
-set -e
-
-# The SSH account to use
-export SSH_ACCOUNT="genie.emfcompare@projects-storage.eclipse.org"
-
-NIGHTLIES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/nightly"
-GROUP="modeling.emfcompare"
-
-CORE_UPDATE_FOLDER=${WORKSPACE}/packaging/org.eclipse.emf.compare.update/target
-EXTRAS_UPDATE_FOLDER=${WORKSPACE}/packaging/org.eclipse.emf.compare.update.extras/target
-
-CORE_UPDATE_ZIP="$(ls ${CORE_UPDATE_FOLDER}/org.eclipse.emf.compare-*.zip | sort -V | tail -n1)"
-EXTRAS_UPDATE_ZIP="$(ls ${EXTRAS_UPDATE_FOLDER}/org.eclipse.emf.compare.extras-*.zip | sort -V | tail -n1)"
-
-CORE_ZIP_NAME=$(echo ${CORE_UPDATE_ZIP} | sed 's/.*\(org.eclipse.emf.compare-.*.zip\)$/\1/')
-EXTRAS_ZIP_NAME=$(echo ${EXTRAS_UPDATE_ZIP} | sed 's/.*\(org.eclipse.emf.compare.extras-.*.zip\)$/\1/')
-QUALIFIER=$(echo ${CORE_UPDATE_ZIP} | sed 's/.*org.eclipse.emf.compare-\(.*\).zip$/\1/')
-
-P2_TIMESTAMP=$(date +"%s000")
-
-ssh "${SSH_ACCOUNT}" mkdir -p ${NIGHTLIES_FOLDER}/${QUALIFIER}
-scp -rp ${CORE_UPDATE_ZIP} ${EXTRAS_UPDATE_ZIP} "${SSH_ACCOUNT}:${NIGHTLIES_FOLDER}/${QUALIFIER}"
-
-# make a composite with both "core" and "extras" features
-cat > compositeArtifacts.xml <<EOF
-<?xml version='1.0' encoding='UTF-8'?>
-<?compositeArtifactRepository version='1.0.0'?>
-<repository name='Eclipse EMF Compare ${QUALIFIER}' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
- <properties size='1'>
- <property name='p2.timestamp' value='${P2_TIMESTAMP}'/>
- </properties>
- <children size='2'>
- <child location='core'/>
- <child location='extras'/>
- </children>
-</repository>
-EOF
-cat > compositeContent.xml <<EOF
-<?xml version='1.0' encoding='UTF-8'?>
-<?compositeMetadataRepository version='1.0.0'?>
-<repository name='Eclipse EMF Compare ${QUALIFIER}' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
- <properties size='1'>
- <property name='p2.timestamp' value='${P2_TIMESTAMP}'/>
- </properties>
- <children size='2'>
- <child location='core'/>
- <child location='extras'/>
- </children>
-</repository>
-EOF
-
-# push this composite to the download area as well
-scp -rp compositeArtifacts.xml compositeContent.xml "${SSH_ACCOUNT}:${NIGHTLIES_FOLDER}/${QUALIFIER}"
-
-ssh "${SSH_ACCOUNT}" -T <<EOF
- pushd ${NIGHTLIES_FOLDER}/${QUALIFIER}
- unzip "${CORE_ZIP_NAME}" -d core/
- unzip "${EXTRAS_ZIP_NAME}" -d extras/
- rm ${CORE_ZIP_NAME}
- rm ${EXTRAS_ZIP_NAME}
- popd
-
- # make sure permissions are update for the emfcompare group
- chgrp -R ${GROUP} ${NIGHTLIES_FOLDER}/${QUALIFIER}
- chmod -R g+w ${NIGHTLIES_FOLDER}/${QUALIFIER}
-
- pushd ${NIGHTLIES_FOLDER}/latest
- rm -r *
- cp -r ../${QUALIFIER}/* .
- popd
-EOF
\ No newline at end of file
+#!/bin/sh
+# ====================================================================
+# Copyright (c) 2021 Obeo
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0
+#
+# Contributors:
+# Obeo - initial API and implementation
+# ====================================================================
+
+if [ ${REFERENCE_TARGET_PLATFORM} != ${PLATFORM} ]; then
+ exit 0
+fi
+
+# Exit on error
+set -e
+
+# The SSH account to use
+export SSH_ACCOUNT="genie.emfcompare@projects-storage.eclipse.org"
+
+NIGHTLIES_FOLDER="/home/data/httpd/download.eclipse.org/modeling/emf/compare/updates/nightly"
+GROUP="modeling.emfcompare"
+
+CORE_UPDATE_FOLDER=${WORKSPACE}/packaging/org.eclipse.emf.compare.update/target
+EXTRAS_UPDATE_FOLDER=${WORKSPACE}/packaging/org.eclipse.emf.compare.update.extras/target
+
+CORE_UPDATE_ZIP="$(ls ${CORE_UPDATE_FOLDER}/org.eclipse.emf.compare-*.zip | sort -V | tail -n1)"
+EXTRAS_UPDATE_ZIP="$(ls ${EXTRAS_UPDATE_FOLDER}/org.eclipse.emf.compare.extras-*.zip | sort -V | tail -n1)"
+
+CORE_ZIP_NAME=$(echo ${CORE_UPDATE_ZIP} | sed 's/.*\(org.eclipse.emf.compare-.*.zip\)$/\1/')
+EXTRAS_ZIP_NAME=$(echo ${EXTRAS_UPDATE_ZIP} | sed 's/.*\(org.eclipse.emf.compare.extras-.*.zip\)$/\1/')
+QUALIFIER=$(echo ${CORE_UPDATE_ZIP} | sed 's/.*org.eclipse.emf.compare-\(.*\).zip$/\1/')
+
+P2_TIMESTAMP=$(date +"%s000")
+
+ssh "${SSH_ACCOUNT}" mkdir -p ${NIGHTLIES_FOLDER}/${QUALIFIER}
+scp -rp ${CORE_UPDATE_ZIP} ${EXTRAS_UPDATE_ZIP} "${SSH_ACCOUNT}:${NIGHTLIES_FOLDER}/${QUALIFIER}"
+
+# make a composite with both "core" and "extras" features
+cat > compositeArtifacts.xml <<EOF
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeArtifactRepository version='1.0.0'?>
+<repository name='Eclipse EMF Compare ${QUALIFIER}' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
+ <properties size='1'>
+ <property name='p2.timestamp' value='${P2_TIMESTAMP}'/>
+ </properties>
+ <children size='2'>
+ <child location='core'/>
+ <child location='extras'/>
+ </children>
+</repository>
+EOF
+cat > compositeContent.xml <<EOF
+<?xml version='1.0' encoding='UTF-8'?>
+<?compositeMetadataRepository version='1.0.0'?>
+<repository name='Eclipse EMF Compare ${QUALIFIER}' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
+ <properties size='1'>
+ <property name='p2.timestamp' value='${P2_TIMESTAMP}'/>
+ </properties>
+ <children size='2'>
+ <child location='core'/>
+ <child location='extras'/>
+ </children>
+</repository>
+EOF
+
+# push this composite to the download area as well
+scp -rp compositeArtifacts.xml compositeContent.xml "${SSH_ACCOUNT}:${NIGHTLIES_FOLDER}/${QUALIFIER}"
+
+ssh "${SSH_ACCOUNT}" -T <<EOF
+ pushd ${NIGHTLIES_FOLDER}/${QUALIFIER}
+ unzip "${CORE_ZIP_NAME}" -d core/
+ unzip "${EXTRAS_ZIP_NAME}" -d extras/
+ rm ${CORE_ZIP_NAME}
+ rm ${EXTRAS_ZIP_NAME}
+ popd
+
+ # make sure permissions are update for the emfcompare group
+ chgrp -R ${GROUP} ${NIGHTLIES_FOLDER}/${QUALIFIER}
+ chmod -R g+w ${NIGHTLIES_FOLDER}/${QUALIFIER}
+
+ pushd ${NIGHTLIES_FOLDER}/latest
+ rm -r *
+ cp -r ../${QUALIFIER}/* .
+ popd
+EOF