commit 59a8e594b3325f4410225e16ba8e90b3ac3709f9
parent 4f9b5e2e05b26939c3a6d6c73ac75432f5aba227
Author: Vincent Forest <vaplv@free.fr>
Date: Thu, 28 Sep 2017 20:57:22 +0200
The solstice.sh script can use the markdown or markdown2 command
Diffstat:
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/solstice.sh b/solstice.sh
@@ -19,19 +19,33 @@ set -e
source ./solstice-menu.sh
+
if [ $# -lt 1 ]; then
echo "Usage: $0 VERSION"
exit 1
fi
+
if [ ! -f "./downloads/Solstice-$1-GNU-Linux64.tar.gz" ]; then
echo "Cannot find Solstice-$1-GNU-Linux64.tar.gz"
exit 1
fi
+
dir_curr=$(pwd) # Current directory
dir_temp=$(mktemp -d) # Working directory
+set +e
+if hash markdown 2> /dev/null; then
+ markdown=markdown
+elif [ hash markdown2 2> /dev/null ]; then
+ markdown=markdown2
+else
+ echo "Cannot find the markdown[2] command"
+ exit 1
+fi
+set -e
+
################################################################################
# Sign the package
################################################################################
@@ -52,7 +66,7 @@ arch=Solstice-$1-GNU-Linux64
cp $dir_curr/downloads/$arch.tar.gz .
gunzip $arch.tar.gz
tar xf $arch.tar
-markdown2 $arch/share/doc/solstice/README.md \
+$markdown $arch/share/doc/solstice/README.md \
| sed '/^<h2>Release notes<\/h2>/,$!d' \
| sed '/^<h2>Licenses<\/h2>/,$d' \
> $dir_curr/release_notes.html.in