feat(cli): 适配使用uploader上传jar包
This commit is contained in:
20
bin/library.sh
Executable file
20
bin/library.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
encrypt_username=AxhEbscwsJDbYMH2
|
||||
encrypt_password=cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4
|
||||
|
||||
upload_url=http://$encrypt_username:$encrypt_password@132.126.207.34:36800
|
||||
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
|
||||
function upload() {
|
||||
source_file_path=$(realpath $1)
|
||||
file_name=$(basename $source_file_path)
|
||||
echo "↪ Source md5: $(md5sum $source_file_path | awk '{print $1}')"
|
||||
echo "↪ Uploading $source_file_path"
|
||||
curl $upload_url/file/upload/$file_name -T $source_file_path
|
||||
echo "↪ Upload ytp success"
|
||||
echo "↪ Download: curl $upload_url/file/download/$file_name -o $file_name"
|
||||
echo "↪ Delete source"
|
||||
rm $source_file_path
|
||||
}
|
||||
Reference in New Issue
Block a user