1
0
mirror of https://tildegit.org/tomasino/pb.git synced 2024-11-20 03:25:54 +01:00

without -c, remove extra labels

This commit is contained in:
James Tomasino 2018-08-15 20:46:35 -04:00
parent 4f869332cf
commit 240ec24e4b

8
pb
View File

@ -43,7 +43,11 @@ die () {
if [ "${code}" -eq 0 ]; then
printf "%s\\n" "${msg}"
else
if [ ${flag_colors} -gt 0 ]; then
printf "%s%s%s\\n" "$ERROR" "${msg}" "$RESET" >&2
else
printf "%s\\n" "${msg}" >&2
fi
fi
fi
exit "${code}"
@ -139,12 +143,12 @@ if [ ${flag_file} -gt 0 ]; then
fi
if [ ${flag_colors} -gt 0 ]; then
printf "%s%s\\t%s" "$RESET" "${f}" "$SUCCESS"
else
printf "%s\\t" "${f}"
fi
if [ -f "${f}" ]; then
curl -F"file=@${f}" "${ENDPOINT}"
if [ ${flag_colors} -gt 0 ]; then
printf "%s" "$RESET"
fi
else
if [ ${flag_colors} -gt 0 ]; then
printf "%sFile not found.%s\\n" "$ERROR" "$RESET"