-
Notifications
You must be signed in to change notification settings - Fork 6
/
install-asciidoc.sh.jam
33 lines (29 loc) · 1.31 KB
/
install-asciidoc.sh.jam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{%@snip:xml pom=pom.xml%}\
{%#define VERSION={%pom /project/version/text()%}%}\
{%@comment
The shell script converted from this file will compile Jamal and then install the resulting JAR files into the
asciidoctor plugin directory. If there is any error, then the original files will be reinstalled.
This way, the internal working of the AsciiDoctor plugin can manually test and the developers can use the latest
development version.
Do not forget to restart IntelliJ after running this script.
%}\
#!/usr/bin/env bash
#
# This shell script was automatically compiled from install-asciidoc.sh.jam
# It is used to automate the installation of the development version of jamal-asciidoc plugin
# from inside the development environment.
#
echo "Compiling and installing Jamal, the whole project"
mvn clean install
echo "Creating the JAMAL_PROJECT_HOME/.asciidoctor/lib directory"
mkdir -p .asciidoctor/lib
echo "cd into JAMAL_PROJECT_HOME/.asciidoctor/lib directory"
pushd .asciidoctor/lib
echo "removing all old files"
rm -f *
echo "unzipping the libraries from the local maven repo"
unzip ~/.m2/repository/com/javax0/jamal/jamal-asciidoc/{%VERSION%}/jamal-asciidoc-{%VERSION%}-jamal-asciidoc-distribution.zip >/dev/null
echo "cd back to Jamal main project directory"
popd
echo "Restart IntelliJ, then you have the new version"
echo "DONE"