Skip to content

Commit

Permalink
Fix the package install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
weshouman committed Dec 17, 2023
1 parent 7d5ce94 commit 3d9bd29
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data/meld_compare.py usr/share/nautilus-python/extensions/
16 changes: 0 additions & 16 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/bin/sh

SCRIPT_BASENAME="meld_compare.py"

# Script paths
TARGET_SCRIPT="/usr/share/nautilus-python/extensions/${SCIRPT_BASENAME}"
NEW_SCRIPT="${TARGET_SCRIPT}.new"
BACKUP_SCRIPT="${TARGET_SCRIPT}.backup"

# Check if the target script already exists (from a previous installation)
if [ -f "$TARGET_SCRIPT" ]; then
echo "Updating the ${SCIRPT_BASENAME} script."
mv "$TARGET_SCRIPT" "${BACKUP_SCRIPT}"
fi

# Rename the new script to the target script
mv "$NEW_SCRIPT" "$TARGET_SCRIPT"

# Inform the user to restart Nautilus
echo "Please restart Nautilus to apply the changes. You can do this by running 'nautilus -q' in your terminal."

14 changes: 14 additions & 0 deletions debian/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

SCRIPT_BASENAME="meld_compare.py"

# Script paths
TARGET_SCRIPT="/usr/share/nautilus-python/extensions/${SCRIPT_BASENAME}"
BACKUP_SCRIPT="${TARGET_SCRIPT}.backup"

# Check if the target script already exists (from a previous installation)
if [ -f "$TARGET_SCRIPT" ]; then
echo "Updating the ${SCIRPT_BASENAME} script."
mv "$TARGET_SCRIPT" "${BACKUP_SCRIPT}"
fi

0 comments on commit 3d9bd29

Please sign in to comment.