Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-07-27 14:20:31 -0400
committerSteffen Pingel2012-07-27 14:20:31 -0400
commit52ce2b531f2207dd48d3d207219d43594f5f3059 (patch)
tree50f458daf5f42cb7bcdd85f092ed01d71a887f3c
parent15fef2219af8cfa056f5b5d7a551b14d0e8249d9 (diff)
downloadorg.eclipse.mylyn-52ce2b531f2207dd48d3d207219d43594f5f3059.tar.gz
org.eclipse.mylyn-52ce2b531f2207dd48d3d207219d43594f5f3059.tar.xz
org.eclipse.mylyn-52ce2b531f2207dd48d3d207219d43594f5f3059.zip
update scripts for creating composite sites
-rwxr-xr-xorg.eclipse.mylyn-site/pack-and-sign/update-composite.sh52
-rwxr-xr-xorg.eclipse.mylyn.releng/bin/create-composite.sh2
2 files changed, 35 insertions, 19 deletions
diff --git a/org.eclipse.mylyn-site/pack-and-sign/update-composite.sh b/org.eclipse.mylyn-site/pack-and-sign/update-composite.sh
index cb06c15..6cd7e62 100755
--- a/org.eclipse.mylyn-site/pack-and-sign/update-composite.sh
+++ b/org.eclipse.mylyn-site/pack-and-sign/update-composite.sh
@@ -1,21 +1,34 @@
#!/bin/bash -e
-BASE=$(dirname $0)
+update() {
source composite.index
-if [ "$DIRS" == "" ]; then
- echo "missing DIRS"
- exit 1
-fi
+#if [ "$DIRS" == "" ]; then
+# echo "missing DIRS in $PWD/composite.index"
+# exit 1
+#fi
if [ "$NAME" == "" ]; then
- echo "missing NAME"
+ echo "missing NAME in $PWD/composite.index"
exit 1
fi
-TIMESTAMP=$(date +%s)000
+FILE=compositeArtifacts.xml
+TAG=compositeArtifactRepository
+TYPE=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
+
+compose
+
+FILE=compositeContent.xml
+TAG=compositeMetadataRepository
+TYPE=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+
+compose
+}
compose() {
+echo "Updating $PWD/$FILE"
+
cat > $FILE <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<?TAG version='1.0.0'?>
@@ -33,6 +46,8 @@ COUNT=0
for i in $DIRS; do
echo " <child location='$i'/>" >> $FILE
COUNT=$((COUNT+1))
+
+ echo " added $i"
done
sed -i -e "s/CHILD_COUNT/$COUNT/" $FILE
@@ -40,18 +55,19 @@ cat >> $FILE <<EOF
</children>
</repository>
EOF
-
-echo "Wrote $COUNT entries to $FILE"
}
-FILE=compositeArtifacts.xml
-TAG=compositeArtifactRepository
-TYPE=org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository
-
-compose
-FILE=compositeContent.xml
-TAG=compositeMetadataRepository
-TYPE=org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository
+TIMESTAMP=$(date +%s)000
-compose
+if [ "$1" == "-r" ]; then
+ for i in $(find -name composite.index); do
+ (cd $(dirname $i); update)
+ setfacl -m u:55011:rwx $(dirname $i)/*.xml || true
+ done
+elif [ -e composite.index ]; then
+ update
+else
+ echo "composite.index not found"
+ exit 1
+fi
diff --git a/org.eclipse.mylyn.releng/bin/create-composite.sh b/org.eclipse.mylyn.releng/bin/create-composite.sh
index fc036b0..6cd7e62 100755
--- a/org.eclipse.mylyn.releng/bin/create-composite.sh
+++ b/org.eclipse.mylyn.releng/bin/create-composite.sh
@@ -9,7 +9,7 @@ source composite.index
#fi
if [ "$NAME" == "" ]; then
- echo "missing NAME in $PWD/comosite.index"
+ echo "missing NAME in $PWD/composite.index"
exit 1
fi

Back to the top