]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
examples: Use cp with force option
authorAndreas Schneider <asn@samba.org>
Mon, 24 Jun 2024 13:14:43 +0000 (15:14 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 28 Jun 2024 11:39:33 +0000 (11:39 +0000)
"Error: SHELLCHECK_WARNING:
/usr/share/doc/samba/printing/VampireDriversFunctions:951:15: warning[SC2216]: Piping to 'cp', a command that doesn't read stdin. Wrong command or missing xargs?
  949|    CWD2=""$( pwd )"" ;
  950|    cd ""${i}"";
  951|->  echo ""yes"" | cp ../alldriverfiles.txt . 2> /dev/null ;
  952|
  953|    cat alldriverfiles.txt \"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
examples/printing/VampireDriversFunctions

index b06e36532145898d6e0346e580a64ebe4977c234..6580f0a2dc650ccb406b00b0defad2c16c83046b 100644 (file)
@@ -948,7 +948,7 @@ else
        for i in */; do
        CWD2="$( pwd )" ;
        cd "${i}";
-       echo "yes" | cp ../alldriverfiles.txt . 2> /dev/null ;
+       cp -f ../alldriverfiles.txt . 2> /dev/null ;
 
        cat alldriverfiles.txt \
        | egrep '(\\'"$(basename "$( pwd )")"'\\|Driver Name)' \
@@ -1076,7 +1076,7 @@ else
        echo " "
        echo " ###########################################################################################"
 
-######         echo "yes" | cp -f ../../../${nthost}/W32X86/${nthost}-enumdrivers3list-NTx86.txt . 2> /dev/null ;
+######         cp -f ../../../${nthost}/W32X86/${nthost}-enumdrivers3list-NTx86.txt . 2> /dev/null ;
                ln -s -f ../${nthost}-enumdrivers3list-NTx86.txt ${nthost}-enumdrivers3list-NTx86.lnk ;
 
        tac ${nthost}-enumdrivers3list-NTx86.lnk \
@@ -1095,7 +1095,7 @@ else
        for i in */; do
        CWD2="$( pwd )" ;
        cd "${i}";
-       echo "yes" | cp ../alldriverfiles.txt . 2> /dev/null ;
+       cp -f ../alldriverfiles.txt . 2> /dev/null ;
 
        cat alldriverfiles.txt \
        | egrep '(\\'"$(basename "$( pwd )")"'\\|Driver Name)' \