This modifies the parsing of $release_name from $release_ver by
grepping for a semantic version with a '.tar.gz' extension.
The prior method used 'rev | cut | rev' to isolate $release_name
as the last field of $release_ver. The rev tool is not installed
by default on some machines.
Co-authored-by: Adam Gaia <git@agaia.dev>
As pointed out by Mišo Barišić in #260, this call might fail when
running 'sudo ./install' because of the fix for CVE-2022-24765, which is
present in git 2.36.0 and certain maintenence releases from 2.30 to
2.35. This variable has been unused in this block since 68df9d2, where a
proper version value was used, rather than being dynamically updated by
'./install'.
Link: https://lore.kernel.org/xmqqv8veb5i6.fsf@gitster.g/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1caa478c52 tried to improve the writeability check to avoid false
positives, such as the one reported in a DistroWatch.com article.
However, it is still possible to break this check by having the
destination and its parent directory not exist:
$ ./install -p $HOME/tmp/directory-does-not-exist/bin
Cannot write into /home/nathan/tmp/directory-does-not-exist/bin, permission denied.
The script already uses 'install -D', which will create the target
directory if it does not exist, so trying to create dest_path
preemptively only increases the complexity of install and risks
introducing false positive errors like above.
Instead, just check the calls to install and print a message about
potential issues with permissions if they fail.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
* list: add functionality to list running or created distroboxes
* rm: add functionality remove created distroboxes
* main: add wrapper to use distrobox commands without hyphens #59
* main: improve argument handling, allow only commands designed to work on host
* install: fix to include plain distrobox command
* Update README to include new commands
* create: check that a folder exists before adding volume in podman
* install: fix basedir chmod
* create: let distrobox-export path to be optional
* create: improve error message for missing distrobox-init
* podman: when we use verbose, also podman should be verbose
* arguments: use also full word for verbose
* README: add brief explanation of all the tools