Many changes
這個提交存在於:
父節點
0526302f3e
當前提交
90fc6ab4fb
共有 39 個檔案被更改,包括 1416 行新增 和 18 行删除
27
bin/.bin/download
可執行檔
27
bin/.bin/download
可執行檔
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "$1" = "surf-download" ]]; then
|
||||
echo "Doing surf"
|
||||
shift
|
||||
# I am shifting so that the vaiable numbers here are the same as in surf
|
||||
useragent="$1"
|
||||
cookiefile="$2"
|
||||
referer="$3"
|
||||
url="$4"
|
||||
fi
|
||||
|
||||
path="~/Downloads/"
|
||||
project=$(project current --path)
|
||||
if [ -n "$project" ]; then
|
||||
path="$project/Downloads/"
|
||||
fi
|
||||
|
||||
mkcd -p "$path"
|
||||
cd "$path"
|
||||
|
||||
echo "$useragent"
|
||||
echo "$cookiefile"
|
||||
echo "$referer"
|
||||
echo "$url"
|
||||
|
||||
curl -g -L -J -O -A "$useragent" -b "$cookiefile" -c "$cookiefile" -e "$referer" "$url"
|
載入中…
新增表格
新增連結
新增問題並參考