Skip to content

Commit

Permalink
Update uninstall: add rmdir based on code review
Browse files Browse the repository at this point in the history
Change if statements to rmdir's.
Also make sure VARA.ini overwrites any VARA.ini file in /tmp/ (for edge cases).
  • Loading branch information
WheezyE authored Jun 19, 2024
1 parent 0375451 commit 83b9de2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/VARA HF/uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ APPDIR=${HOME}/.local/share/applications
WINEDIR=${HOME}/.wine

#Unregistering OCX/DLL files from your wineprefix
BOX86_NOBANNER=1 BOX64_NOBANNER=1 WINEDEBUG=-all wine regsvr32 ${WINEDIR}/drive_c/VARA/OCX/* /u /s # note: some DLL's don't have built-in register/unregister functions and will error
BOX86_NOBANNER=1 BOX64_NOBANNER=1 WINEDEBUG=-all wine regsvr32 ${WINEDIR}/drive_c/VARA/OCX/* /u /s #note: some DLL's don't have built-in register/unregister functions and will error

#Removing program files (keeping any VARA.ini settings files)
mv ${WINEDIR}/drive_c/VARA/VARA.ini /tmp/VARA.ini 2>/dev/null
mv -f ${WINEDIR}/drive_c/VARA/VARA.ini /tmp/VARA.ini 2>/dev/null
rm -rf ${WINEDIR}/drive_c/VARA/* 2>/dev/null || error 'Could not remove VARA program files.'
mv /tmp/VARA.ini ${WINEDIR}/drive_c/VARA/VARA.ini 2>/dev/null
if [ $(ls -A "${WINEDIR}/drive_c/VARA" | wc -l) -eq 0 ]; then rm -rf "${WINEDIR}/drive_c/VARA" 2>/dev/null; fi #also delete directory if empty
rmdir "${WINEDIR}/drive_c/VARA" 2>/dev/null #delete directory if empty

#Removing Desktop Entry
rm ${APPDIR}/VARA/varahf.desktop 2>/dev/null || echo "Could not remove menu button."
if [ $(ls -A "${APPDIR}/VARA" | wc -l) -eq 0 ]; then rm -rf "${APPDIR}/VARA" 2>/dev/null; fi #also delete directory if empty
rmdir "${APPDIR}/VARA" 2>/dev/null #delete directory if empty

0 comments on commit 83b9de2

Please sign in to comment.