-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake_avs_lin.sh
49 lines (38 loc) · 1013 Bytes
/
make_avs_lin.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env sh
PRG="$0"
CMD=$1
FILE_PATH=$2
BUILD_DIR=$3
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/." >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
echo CMD: "$CMD"
if [ "$CMD" = "check" ]; then
echo "check success"
exit 0
fi
echo "=== prepare build ==="
FILE=${FILE_PATH##*/}
FILE_NAME="${FILE%.*}"
AUDIVERIS=$APP_HOME/audiveris/lin/run
ZIP=$APP_HOME/audiveris/lin/zip
echo "=== run orm and export === "
sh $AUDIVERIS -batch -export -output $BUILD_DIR $FILE_PATH
BUILD_PATH=$BUILD_DIR/$FILE_NAME
echo "=== run pack msmr file === "
$ZIP -j -0 $BUILD_PATH/$FILE_NAME.msmr $BUILD_PATH/$FILE_NAME.mxl $BUILD_PATH/$FILE_NAME.omr
echo "\n"
echo "all done file: " $BUILD_PATH/$FILE_NAME.msmr