diff --git a/tesoft.bash b/tesoft.bash index 2d1059a..46009e3 100755 --- a/tesoft.bash +++ b/tesoft.bash @@ -1,6 +1,6 @@ #!/bin/sh -cookie_path=./cookies.txt +cookie_path=cookies.txt print_help() { echo "tesoft.dev helper script" @@ -64,7 +64,7 @@ upload() { exit 1 fi - tar -C "$1" -cf /tmp/article.tar $(ls "$1") + tar -C "$1" --exclude=$cookie_path -cf /tmp/article.tar $(ls "$1") out=$(curl -v -f -X PUT -F "file=@/tmp/article.tar" "$URL/api/blog" -b "$cookie_path" 2>&1) if [ $? -ne 0 ]; then echo "$out" >&2 @@ -88,7 +88,7 @@ patch() { exit 1 fi - tar -C "$2" -cf /tmp/article.tar $(ls "$2") + tar -C "$2" --exclude=$cookie_path -cf /tmp/article.tar $(ls "$2") out=$(curl -v -f -X PATCH -F "file=@/tmp/article.tar" "$URL/api/blog/$1" -b "$cookie_path" 2>&1) if [ $? -ne 0 ]; then echo "$out" >&2