Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: jackie777 on 27 July 2025, 20:10:35

Title: need help with make and paths
Post by: jackie777 on 27 July 2025, 20:10:35
Is there a way to cd in to directory like ~/.local/share/sxwm then use doas make install and return back to the scripts to  continued where i left of because my scripts is automatic.
Title: Re: need help with make and paths
Post by: cds on 27 July 2025, 20:22:25
I depends on how cheesy you want the scripting to be.
You"could" just add the add the cd and doas make within the original script then cd back to where you want.

Again, this is a down n dirty way to do it but doable

Title: Re: need help with make and paths
Post by: dpx on 27 July 2025, 20:28:56
Is there a way to cd in to directory like ~/.local/share/sxwm then use doas make install and return back to the scripts to  continued where i left of because my scripts is automatic.

Script as bash? Python?

Bash has cd <somewhere> then <do your stuff there>, then cd -, which returns you to dir where you were.
Title: Re: need help with make and paths
Post by: mrbrklyn on 28 July 2025, 13:04:59
Is there a way to cd in to directory like ~/.local/share/sxwm then use doas make install and return back to the scripts to  continued where i left of because my scripts is automatic.


You can't just run in as root?  There is not much information here, but there are several ways to attack such a problem including SUID, chrooting the script, using su

The traditional means of doing this is to break the make file with make into a compile command and an install command where the install command is expected to be run with sudo or doas.
Title: Re: need help with make and paths
Post by: clappingsnowdrop on 28 July 2025, 14:49:40
A bit vague, but I'm assuming you want to make install in a specified directory.

Code: [Select]
doas make install -C /sample-directory 

Source: make man page.