File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -5113,22 +5113,18 @@ function transfer {
5113
5113
echo " No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>" >&2
5114
5114
return 1
5115
5115
fi
5116
+
5116
5117
if tty -s; then
5117
5118
file=" $1 "
5118
5119
file_name=$( basename " $file " )
5119
5120
if [[ ! -e $file ]]; then
5120
5121
echo " $file : No such file or directory" >&2
5121
5122
return 1
5122
5123
fi
5123
- if [[ -d $file ]]; then
5124
- file_name=" $file_name .zip"
5125
- (cd " $file " && zip -r -q - .) | curl --progress-bar --upload-file " -" " https://oshi.at/${file_name} " | tee /dev/null
5126
- else
5127
- cat " $file " | curl --progress-bar --upload-file " -" " https://oshi.at/${file_name} " | tee /dev/null
5128
- fi
5124
+ tar -czvf /tmp/$file_name $file > /dev/null 2>&1 && curl -s https://bashupload.com/$file .tgz --data-binary @/tmp/$file_name | grep wget
5129
5125
else
5130
5126
file_name=$1
5131
- curl --progress-bar --upload- file " - " " https://oshi.at/ ${ file_name} " | tee /dev/null
5127
+ tar -czvf /tmp/ $file_name $ file > /dev/null 2>&1 && curl -s https://bashupload.com/ $file .tgz --data-binary @/tmp/ $ file_name | grep wget
5132
5128
fi
5133
5129
}
5134
5130
@@ -5140,7 +5136,7 @@ function sendToNotify {
5140
5136
NOTIFY_CONFIG=~ /.config/notify/provider-config.yaml
5141
5137
fi
5142
5138
if [[ -n " $( find " ${1} " -prune -size +8000000c) " ]]; then
5143
- printf ' %s is larger than 8MB, sending over oshi.at \n' " ${1} "
5139
+ printf ' %s is larger than 8MB, sending over external service \n' " ${1} "
5144
5140
transfer " ${1} " | notify -silent
5145
5141
return 0
5146
5142
fi
You can’t perform that action at this time.
0 commit comments