octave.buildEnv: Handle better no packages situation
Use `rm -f` for *.tar.gz files so the command won't fail in case there aren't any packages. Create the `$out/.octave_packages` file before iterating the packages.
This commit is contained in:
parent
213cde9203
commit
351187d848
@ -40,11 +40,15 @@ in buildEnv {
|
|||||||
cd $out
|
cd $out
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove symlinks to the input tarballs, they aren't needed.
|
# Remove symlinks to the input tarballs, they aren't needed, use -f so it
|
||||||
rm $out/*.tar.gz
|
# will not fail if no .tar.gz symlinks are there - for example if
|
||||||
|
# sommething which is not a tarball used as a package
|
||||||
|
rm -f $out/*.tar.gz
|
||||||
|
|
||||||
createOctavePackagesPath $out ${octave}
|
createOctavePackagesPath $out ${octave}
|
||||||
|
|
||||||
|
# Create the file even if the loop afterwards has no packages to run over
|
||||||
|
touch $out/.octave_packages
|
||||||
for path in ${lib.concatStringsSep " " packages}; do
|
for path in ${lib.concatStringsSep " " packages}; do
|
||||||
if [ -e $path/*.tar.gz ]; then
|
if [ -e $path/*.tar.gz ]; then
|
||||||
$out/bin/octave-cli --eval "pkg local_list $out/.octave_packages; \
|
$out/bin/octave-cli --eval "pkg local_list $out/.octave_packages; \
|
||||||
|
Loading…
Reference in New Issue
Block a user