vérifier l'existence du fichier input
This commit is contained in:
parent
f0644feebd
commit
f4a9922c7f
4
mysqlcsv
4
mysqlcsv
|
@ -100,6 +100,10 @@ if [ "$1" != "--" ]; then
|
|||
query="$1"; shift
|
||||
fi
|
||||
|
||||
if [ -n "$input" -a "$input" != "-" ]; then
|
||||
[ -f "$input" ] || die "$input: fichier introuvable"
|
||||
fi
|
||||
|
||||
if [ -n "${configs[*]}" ]; then
|
||||
PROFILE="$profile"
|
||||
array_fix_paths configs
|
||||
|
|
|
@ -112,6 +112,10 @@ if [ -n "${configs[*]}" ]; then
|
|||
fi
|
||||
[ -n "$table" ] || die "Vous devez spécifier la table dans laquelle se fera l'importation"
|
||||
|
||||
if [ -n "$input" -a "$input" != "-" ]; then
|
||||
[ -f "$input" ] || die "$input: fichier introuvable"
|
||||
fi
|
||||
|
||||
isnum "$skip_lines" || skip_lines=0
|
||||
|
||||
if [ -n "${fields[*]}" ]; then
|
||||
|
|
Loading…
Reference in New Issue