Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

Report Bugs, Issues and non- package Requests
Message
Author
Jakob77
Posts: 651
Joined: Thu Feb 09, 2023 3:09 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

#31 Post by Jakob77 »

DukeComposed

Thank you. :-)
You have a point, and I love to see your code but I believe the last part is too complicated for a user script like "xinitrc"
I am not familiar with the shell but if the "-p" option can do it alone, then maybe just this can also work in another test:

Code: Select all

	mkdir -p "$HOME/Live-usb-storage/bin"

	if [ -d "$HOME/Live-usb-storage/bin" ] ; then
	PATH="$PATH:$HOME/Live-usb-storage/bin"
	chmod 700 ~/Live-usb-storage/bin
	fi
It saves a line or two compared, and it is not as hard for beginners to understand or edit.

User avatar
DukeComposed
Posts: 1389
Joined: Thu Mar 16, 2023 1:57 pm

Re: Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

#32 Post by DukeComposed »

Jakob77 wrote: Wed Jun 04, 2025 8:18 pm I believe the last part is too complicated for a user script like "xinitrc"
This is nonsense. Bad code that's easy to understand is still bad code. The issues in the logical flow of the original version make understanding it harder, not easier. No one says "If you're out of milk, go to the store. If the store is open, find the milk. If the store is open, check the milk's expiration date. If the store is open, buy the milk." Code that doesn't stutter is code that's easier to read and easier for people to follow what it's trying to accomplish.
Jakob77 wrote: Wed Jun 04, 2025 8:18 pm I am not familiar with the shell but
I noticed. Linux is one of the few self-documenting operating systems where man pages come with the OS for free. If you're going to urge people to run mkdir(1), you should at some point understand what it does. Then take steps to ensure your software (1) does what it's supposed to do, and (2) doesn't do what it isn't supposed to do. Allowing mkdir(1) to recursively create subdirectories isn't needed here. Instead of "well, putting -p here works so it's probably fine", I could just as easily argue "not putting -p here works and it limits the effect of the command to at most creating the single directory desired... so that's better".

User avatar
Eadwine Rose
Administrator
Posts: 14618
Joined: Wed Jul 12, 2006 2:10 am

Re: Requesting update file for PATH (21.3 Wildflower Xfce)(and now mx25)

#33 Post by Eadwine Rose »

As has been stated two years ago, and again yesterday: the MX Team is going to do things their own way. If feedback is needed they will ask for it.

This topic is from 2023 and has been hashed out long enough, so now closed.

Please do not open any more path topics and what the MX Team should do with that, thank you.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

Locked

Return to “Bugs and Non-Package Requests Forum”