-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.sh
executable file
·63 lines (56 loc) · 1.8 KB
/
package.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
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
cd "$(dirname "$0")"
export SCRIPT_DIR="$(pwd)"
export PACKAGE_NAME=LREditionDetails
export TARGET_DIR_MAC="$SCRIPT_DIR/target/mac/Library/Application Support/Adobe/Lightroom"
export TARGET_DIR_WIN="$SCRIPT_DIR/target/win/AppData/Roaming/Adobe/Lightroom"
export SOURCE_DIR=$SCRIPT_DIR/src/main/lua/$PACKAGE_NAME.lrdevplugin
export RESOURCE_DIR=$SCRIPT_DIR/res
export VERSION=1.1.0.0
#
export TARGET_DIR_QRGEN_MAC="$SCRIPT_DIR/target/mac/Library/Application Support/QRGen"
export TARGET_DIR_QRGEN_WIN="$SCRIPT_DIR/target/win/AppData/Local/Programs/QRGen"
export SOURCE_DIR_QRGEN="$HOME/Library/Application Support/QRGen"
#
# mac
#
if [ -d "$TARGET_DIR_MAC" ]; then
rm -d -f -r "$TARGET_DIR_MAC"
fi
rm $SCRIPT_DIR/target/$PACKAGE_NAME-$VERSION"_mac.zip"
mkdir -p "$TARGET_DIR_MAC/Modules/$PACKAGE_NAME.lrplugin"
mkdir -p "$TARGET_DIR_QRGEN_MAC"
# copy dev
cp -R "$SOURCE_DIR"/* "$TARGET_DIR_MAC/Modules/$PACKAGE_NAME.lrplugin"
cp -R "$SOURCE_DIR_QRGEN"/* "$TARGET_DIR_QRGEN_MAC"
# compile
#cd "$TARGET_DIR_MAC/Modules/$PACKAGE_NAME.lrplugin"
#for f in *.lua
#do
# luac5.1 -o $f $f
#done
# cd $RESOURCE_DIR
# cp -R * "$TARGET_DIR_MAC"
cd "$SCRIPT_DIR/target/mac"
zip -q -r ../$PACKAGE_NAME-$VERSION"_mac.zip" Library
# win
#
if [ -d "$TARGET_DIR_WIN" ]; then
rm -d -f -r "$TARGET_DIR_WIN"
fi
rm $SCRIPT_DIR/target/$PACKAGE_NAME-$VERSION"_win.zip"
mkdir -p "$TARGET_DIR_WIN/Modules/$PACKAGE_NAME.lrplugin"
mkdir -p "$TARGET_DIR_QRGEN_WIN"
# copy dev
cp -R "$SOURCE_DIR"/* "$TARGET_DIR_WIN/Modules/$PACKAGE_NAME.lrplugin"
cp -R "$SOURCE_DIR_QRGEN"/* "$TARGET_DIR_QRGEN_WIN"
# compile
#cd "$TARGET_DIR_WIN/Modules/$PACKAGE_NAME.lrplugin"
#for f in *.lua
#do
# luac5.1 -o $f $f
#done
# cd $RESOURCE_DIR
# cp -R * "$TARGET_DIR_WIN"
cd $SCRIPT_DIR/target/win
zip -q -r ../$PACKAGE_NAME-$VERSION"_win.zip" AppData