D
D
DVoropaev2018-11-18 16:04:40
linux
DVoropaev, 2018-11-18 16:04:40

How to change file paths when building a release?

I write various utilities for linux for myself and for others. Usually in bash or python. In most cases, each utility consists of several scripts that call each other.
And I face the following problem:
During development and testing, my files are in the same directories (somewhere in the home folder), and when I collect everything in a .deb package, the paths to the scripts are different. Every time you have to change the paths in all files, and this is:
1) Long
2) Inconvenient
3) It is very easy to make a mistake or miss something
. launched with the "debug" key, then use these values, otherwise - others

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2018-11-18
@ky0

Relative paths will save the father of Russian democracy.

J
Jock Tanner, 2018-11-18
@Tanner

I don't know about bash, but you should probably learn how to package Python with pipand setuptools. Here's a good guide , you can skip the “ Uploading the distribution archives ” part onwards if you don't want to make your packages public. And don't forget about pip install -e.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question