Skip to content

Commit

Permalink
Added uninstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Nov 18, 2024
1 parent bdb2037 commit a8ee44d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
24 changes: 14 additions & 10 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash
UNINSTALLER="/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/AutoSubs-Uninstaller.sh"
cat <<EOF > "$UNINSTALLER"
#!/bin/bash
echo "Removing AutoSubs files..."
rm -rf "/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/AutoSubs"
echo "AutoSubs uninstalled successfully!"
EOF
chmod +x "$UNINSTALLER"
echo "Uninstaller created at: $UNINSTALLER"
exit 0

# Path to the uninstaller script
UNINSTALLER_SCRIPT="/tmp/uninstaller.sh"

# Copy the uninstaller script to a temporary location
cp "${PWD}/uninstaller.sh" "$UNINSTALLER_SCRIPT"

# Execute the uninstaller script
bash "$UNINSTALLER_SCRIPT"

# Clean up
rm -f "$UNINSTALLER_SCRIPT"

exit 0
26 changes: 26 additions & 0 deletions scripts/uninstaller.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

echo "Uninstalling AutoSubs..."

# Define paths to remove
AUTOSUBS_DIR="/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/AutoSubs"
LUA_SCRIPT="/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/AutoSubs V2.lua"

# Remove the AutoSubs directory
if [ -d "$AUTOSUBS_DIR" ]; then
rm -rf "$AUTOSUBS_DIR"
echo "Removed directory: $AUTOSUBS_DIR"
else
echo "Directory not found: $AUTOSUBS_DIR"
fi

# Remove the Lua script
if [ -f "$LUA_SCRIPT" ]; then
rm -f "$LUA_SCRIPT"
echo "Removed file: $LUA_SCRIPT"
else
echo "File not found: $LUA_SCRIPT"
fi

echo "Uninstallation complete."
exit 0

0 comments on commit a8ee44d

Please sign in to comment.