Merge pull request #46 from MightyCreak/fix-install-script

Fix install script
This commit is contained in:
Creak 2020-06-20 19:17:03 -04:00 committed by GitHub
commit e76790a3da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- added a preference and command line option to specify the version control system search order - added a preference and command line option to specify the version control system search order
- added .editorconfig file - added .editorconfig file
- added .gitignore file - added .gitignore file
- added message when removing files during uninstallation
### Changed ### Changed
- convert to Python 3 - convert to Python 3
@ -23,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- improve Spanish translation - improve Spanish translation
- convert translation README to MarkDown - convert translation README to MarkDown
### Fixed
- fixed wrong icons directory for gtk-update-icon-cache
- fixed missing directories when uninstalling
## [0.4.8] - 2014-07-18 ## [0.4.8] - 2014-07-18
### Added ### Added
- updated use of gtk.SpinButton and gtk.Entry to avoid quirks seen on some platforms - updated use of gtk.SpinButton and gtk.Entry to avoid quirks seen on some platforms

View File

@ -151,6 +151,7 @@ def processFiles(install, dst, src, template):
os.chmod(d, 0o755) os.chmod(d, 0o755)
else: else:
# remove file # remove file
print(f'Removing {d}')
removeFile(d) removeFile(d)
# compile .po files and install # compile .po files and install
@ -252,7 +253,17 @@ processTranslations(install, os.path.join(destdir, prefix[1:]))
if not install: if not install:
# remove directories we own # remove directories we own
for s in 'share/omf/diffuse', 'share/gnome/help/diffuse/C', 'share/gnome/help/diffuse/ru', 'share/gnome/help/diffuse', 'share/diffuse/syntax', 'share/diffuse': dirs_to_remove = [
'share/omf/diffuse',
'share/gnome/help/diffuse/C',
'share/gnome/help/diffuse/cs',
'share/gnome/help/diffuse/it',
'share/gnome/help/diffuse/ru',
'share/gnome/help/diffuse',
'share/diffuse/syntax',
'share/diffuse'
]
for s in dirs_to_remove:
d = os.path.join(destdir, os.path.join(prefix, s)[1:]) d = os.path.join(destdir, os.path.join(prefix, s)[1:])
try: try:
os.rmdir(d) os.rmdir(d)
@ -264,7 +275,7 @@ if not files_only:
print(f'Performing post {stage} tasks.') print(f'Performing post {stage} tasks.')
cmds = [ [ 'update-desktop-database' ], cmds = [ [ 'update-desktop-database' ],
[ 'gtk-update-icon-cache', os.path.join(destdir, os.path.join(prefix, 'icons/hicolor')[1:]) ] ] [ 'gtk-update-icon-cache', os.path.join(destdir, os.path.join(prefix, 'share/icons/hicolor')[1:]) ] ]
if install: if install:
cmds.append([ 'scrollkeeper-update', '-q', '-o', os.path.join(destdir, os.path.join(prefix, 'share/omf/diffuse')[1:]) ]) cmds.append([ 'scrollkeeper-update', '-q', '-o', os.path.join(destdir, os.path.join(prefix, 'share/omf/diffuse')[1:]) ])
else: else: