Skip to content

Commit

Permalink
chore(element-template): Use symlinks for ET
Browse files Browse the repository at this point in the history
  • Loading branch information
johnBgood committed Jul 10, 2024
1 parent 4c653c5 commit 00c0f49
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions connectors/copy-element-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@ cd "$SCRIPT_DIR" || exit
echo -e "${BLUE}Starting to copy element templates to ~/Library/Application\ Support/camunda-modeler/resources/element-templates${NC}"
# Find all .json files in element-templates directories and copy them to /tmp/json
find . -type d -name "element-templates" | while read -r dir; do
find "$dir" -type f -name "*.json" -exec cp {} ~/Library/Application\ Support/camunda-modeler/resources/element-templates/ \;
echo -e "${YELLOW}Copied ETs from [$dir]${NC}"
find "$dir" -type f -name "*.json" | while read -r file; do
dest_dir=~/Library/Application\ Support/camunda-modeler/resources/element-templates/
dest_file="$dest_dir$(basename "$file")"
# Remove the existing symlink if it exists
if [ -L "$dest_file" ]; then
rm "$dest_file"
fi
# Create the new symlink
ln -s "$SCRIPT_DIR/$file" "$dest_file"
echo -e "${YELLOW}Created symlink for [$file]${NC}"
done
done

echo -e "${GREEN}All element templates have been copied to ~/Library/Application\ Support/camunda-modeler/resources/element-templates${NC}"

0 comments on commit 00c0f49

Please sign in to comment.