Skip to content

Commit c942a67

Browse files
committed
publish-updates.command added, with explicit confirmation
1 parent 655e6f3 commit c942a67

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

scripts/publish-updates.command

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /bin/bash
2+
3+
# Get absolute path of shell script. Supports:
4+
# source ./script (When called by the . dot operator)
5+
# Absolute path /path/to/script
6+
# Relative path like ./script
7+
# /path/dir1/../dir2/dir3/../script
8+
# When called from symlink
9+
# When symlink is nested eg) foo->dir1/dir2/bar bar->./../doe doe->script
10+
# When caller changes the scripts name
11+
12+
pushd . > /dev/null
13+
SCRIPT_PATH="${BASH_SOURCE[0]}";
14+
while([ -h "${SCRIPT_PATH}" ]) do
15+
cd "`dirname "${SCRIPT_PATH}"`"
16+
SCRIPT_PATH="$(readlink "`basename "${SCRIPT_PATH}"`")";
17+
done
18+
cd "`dirname "${SCRIPT_PATH}"`" > /dev/null
19+
SCRIPT_PATH="`pwd`";
20+
popd > /dev/null
21+
#echo "script=[${SCRIPT_PATH}]"
22+
#echo "pwd =[`pwd`]"
23+
24+
read -p "Do you really want to publish? (Yes)? " answer
25+
case $answer in
26+
Yes ) (cd "${SCRIPT_PATH}"; sh publish-updates.sh);;
27+
* ) exit;;
28+
esac

scripts/publish-updates.sh

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ cd ../ilg.gnuarmeclipse-repository/target
4949
echo "Rsync-ing SourceForge $SF_FOLDER$TEST site"
5050
(cd repository; rsync -e ssh $RSYNC_OPTS $SOURCE_LIST $SF_DESTINATION)
5151

52+
if [ "$TEST" = "test" ]
53+
then
54+
echo "Published on the test site"
55+
else
56+
echo "Published on the main site. Don't forget to publish the archive too!"
57+
fi
58+
5259
if [ -f *-SNAPSHOT.zip ]
5360
then
5461
NUMDATE=$(ls repository/plugins/ilg.gnuarmeclipse.managedbuild.cross* | sed -e 's/.*_[0-9]*[.][0-9]*[.][0-9]*[.]\([0-9]*\)[.]jar/\1/')

0 commit comments

Comments
 (0)