-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·32 lines (29 loc) · 900 Bytes
/
Copy pathpackage.sh
File metadata and controls
executable file
·32 lines (29 loc) · 900 Bytes
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
#!/usr/bin/env bash
cd "$(dirname "$0")"
export SCRIPT_DIR="$(pwd)"
export PACKAGE_NAME=LRDavinci
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.0.0.0
#
# 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"
# copy dev
cp -R $SOURCE_DIR/* "$TARGET_DIR_MAC/Modules/$PACKAGE_NAME.lrplugin"
# 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