2020-10-09 19:35:46 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This is a convenient way to build and test a plugin demo.
|
|
|
|
# It could be used to develop plugins too.
|
|
|
|
|
2020-11-13 20:48:42 +02:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
2023-06-13 19:06:16 +02:00
|
|
|
TEMP_PATH=~/src/plugin-tests
|
2023-09-18 18:40:36 +02:00
|
|
|
PLUGIN_PATH=~/src/joplin/packages/app-cli/tests/support/plugins/note_list_renderer
|
2023-06-13 19:06:16 +02:00
|
|
|
|
|
|
|
mkdir -p "$TEMP_PATH"
|
|
|
|
PLUGIN_NAME=$(echo "$PLUGIN_PATH" | awk -F/ '{print $NF}')
|
|
|
|
TEMP_PLUGIN_PATH="$TEMP_PATH/$PLUGIN_NAME"
|
|
|
|
|
2023-09-18 18:40:36 +02:00
|
|
|
echo "Copying from: $PLUGIN_PATH"
|
|
|
|
echo "To: $TEMP_PLUGIN_PATH"
|
|
|
|
|
2023-06-13 19:06:16 +02:00
|
|
|
rsync -a --delete "$PLUGIN_PATH/" "$TEMP_PLUGIN_PATH/"
|
|
|
|
|
|
|
|
npm install --prefix="$TEMP_PLUGIN_PATH" && yarn start --dev-plugins "$TEMP_PLUGIN_PATH"
|
|
|
|
|
|
|
|
# Add eg "--profile $HOME/.config/joplindev-desktop-1" to test with a different profile
|