Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create BinPath, LauncherPath and IconPath if they don't exist. #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ifohancroft
Copy link
Contributor

@ifohancroft ifohancroft commented Feb 5, 2021

Changed /usr/local/ to /usr/ to avoid the multiple problems that come from using /usr/local/
Also, fixes #9

@ifohancroft
Copy link
Contributor Author

Just wanted to see if you have had the time to check this PR?

@glutanimate
Copy link
Owner

Hey Ifo, Thanks for the ping (plus your original contribution of course), and sorry for taking ages to look at this!

So in general, I wouldn't be completely opposed to changing the root installation path to /usr, but I do feel like this goes against the usual conventions with manually installed projects.

Naively speaking and without having looked at PDFMtEd in a while, how about creating BinPath, LauncherPath, and IconPath recursively if they do not exist? That should be possible with mkdir -p.

@ifohancroft
Copy link
Contributor Author

Hey, Most welcome!

That's fine, I am just glad that you are well and here now.

That's a very good point. I keep forgetting about that.

I have an idea about it but I will comment later tonight about it on here, as I have something to do first and I need to quickly research something about it.

@ifohancroft
Copy link
Contributor Author

I wanted to check if there would be an error from mkdir -p if the directories all exist and perhaps add a check if there is an error, but there isn't one, so I just changed /usr to /usr/local again and added:

mkdir -p "$BinPath"
mkdir -p "$LaunchPath"
mkdir -p "$IconPath"

To install.sh. Although, perhaps I should perhaps rename the PR.

@ifohancroft ifohancroft changed the title Changed /usr/local/ to /usr/ Create BinPath, LaunchPath and IconPath if they don't exist. Sep 9, 2021
Fixed a typo where I was trying to create a dir using an unexisting variable $LaunchPath instead of $LauncherPath
@ifohancroft ifohancroft changed the title Create BinPath, LaunchPath and IconPath if they don't exist. Create BinPath, LauncherPath and IconPath if they don't exist. Sep 10, 2021
@nbehrnd
Copy link

nbehrnd commented Apr 5, 2022

Ping @glutanimate @ifohancroft
Are there updates regarding path /usr/local/share/icons/hicolor/scalable/apps? Speaking to Debian 12/bookworm (branch testing), I equally had to apply the «the trick» from here for a pristine installation of the program.

@ifohancroft
Copy link
Contributor Author

Ping @glutanimate @ifohancroft
Are there updates regarding path /usr/local/share/icons/hicolor/scalable/apps? Speaking to Debian 12/bookworm (branch testing), I equally had to apply the «the trick» from here for a pristine installation of the program.

@nbehrnd I am basically waiting for @glutanimate to merge this PR. IIRC this creates the directories if they don't exist.

@ifohancroft
Copy link
Contributor Author

So in general, I wouldn't be completely opposed to changing the root installation path to /usr, but I do feel like this goes against the usual conventions with manually installed projects.

Apparently this seems to be the exception as opposed to the standard in the Filesystem Hierarchy Standard. If you take a look here where it lists deviations from the standard, it lists how FreeBSD uses /usr and /usr/local to differentiate between custom software and software from the distribution. So I guess creating the directories in /usr won't be going against the standard, although it does seem more common for software to install itself under /usr/local/

@aliraeisdanaei
Copy link

aliraeisdanaei commented Mar 15, 2023

I wanted to check if there would be an error from mkdir -p if the directories all exist and perhaps add a check if there is an error, but there isn't one, so I just changed /usr to /usr/local again and added:

mkdir -p "$BinPath"
mkdir -p "$LaunchPath"
mkdir -p "$IconPath"

To install.sh. Although, perhaps I should perhaps rename the PR.

Why doesn't the script first try the /usr/local/ then if it doesn't exist go to /usr/

Because this solution seems to create unnecessary directories.

@aliraeisdanaei
Copy link

I wanted to check if there would be an error from mkdir -p if the directories all exist and perhaps add a check if there is an error, but there isn't one, so I just changed /usr to /usr/local again and added:

mkdir -p "$BinPath"
mkdir -p "$LaunchPath"
mkdir -p "$IconPath"

To install.sh. Although, perhaps I should perhaps rename the PR.

Why doesn't the script first try the /usr/local/ then if it doesn't exist go to /usr/

Because this solution seems to create unnecessary directories.

I created a pull request for this as can be seen here

Changed install.sh to try alt install directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing folders during installation
4 participants