buildFishPlugin: check if any .fish file exists in source

This commit is contained in:
Martino Fontana 2023-04-04 14:49:33 +02:00 committed by Yt
parent 51d7be2c34
commit 4601687123

View File

@ -45,9 +45,11 @@ stdenv.mkDerivation (drvAttrs // {
source="$1"
target="$out/share/fish/vendor_$2.d"
[ -d $source ] || return 0
# Check if any .fish file exists in $source
[ -n "$(shopt -s nullglob; echo $source/*.fish)" ] || return 0
mkdir -p $target
cp -r $source/*.fish "$target/"
cp $source/*.fish "$target/"
}
install_vendor_files completions completions