Skip to content

Commit e499d31

Browse files
committed
Build script now calls pack.sh
Also in this commit: * Fix: pack.sh would continue even if a command like cp fails. Now will terminate on the first error.
1 parent 1aea21f commit e499d31

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,10 @@ command -v git > /dev/null && (
9090
command -v ctags > /dev/null && (
9191
ctags --recurse ./src || exit
9292
)
93+
94+
# -----------------------------------------------------------------------------
95+
# Call pack.sh, to generate the jar files.
96+
# -----------------------------------------------------------------------------
97+
cd build
98+
./pack.sh
99+
cd -

build/pack.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ echo :: Building packages
1616
# Create destination folder
1717
# -----------------------------------------------------------------------------
1818
DIST_DIR=kpdfsync
19-
rm -rf $DIST_DIR
20-
mkdir -p $DIST_DIR/bin
19+
rm -rf $DIST_DIR || exit
20+
mkdir -p $DIST_DIR/bin || exit
2121

2222
pushd classes
2323

@@ -43,17 +43,17 @@ popd
4343
# -----------------------------------------------------------------------------
4444

4545
# Move the jar files to kpdfsync/bin folder.
46-
mv classes/*.jar ./$DIST_DIR/bin
47-
cp ../lib/pdfclown.jar ./$DIST_DIR/bin
48-
cp -r ../tools ./$DIST_DIR/bin
46+
mv classes/*.jar ./$DIST_DIR/bin || exit
47+
cp ../lib/pdfclown.jar ./$DIST_DIR/bin || exit
48+
cp -r ../tools ./$DIST_DIR/bin || exit
4949

5050
# Copy the kpdfsync.sh and kpdfsync.bat to kpdfsync dist folder.
51-
cp kpdfsync.sh ./$DIST_DIR
52-
cp kpdfsync.bat ./$DIST_DIR
51+
cp kpdfsync.sh ./$DIST_DIR || exit
52+
cp kpdfsync.bat ./$DIST_DIR || exit
5353

5454
# Copy LICENSE Readme.md and HowTo.pdf to kpdfsync dist folder.
55-
cp ../docs/kpdfsync_HowTo.pdf ./$DIST_DIR
56-
cp ../README.md ./$DIST_DIR
57-
cp ../LICENSE ./$DIST_DIR
55+
cp ../docs/kpdfsync_HowTo.pdf ./$DIST_DIR || exit
56+
cp ../README.md ./$DIST_DIR || exit
57+
cp ../LICENSE ./$DIST_DIR || exit
5858

5959
echo :: Building packages completed

0 commit comments

Comments
 (0)