瀏覽代碼

Ensure we create a directory with filenames extracted from the URL

tags/v0.5.2^2
Bèr Kessels 1 年之前
父節點
當前提交
2fe9206522
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      wget-to-ipfs.sh

+ 2
- 1
wget-to-ipfs.sh 查看文件

@@ -379,6 +379,7 @@ fi

_check_binary "ipfs"

_file_name="$(basename "${arg_u}")"

_file_hash="$(ipfs add --nocopy --cid-version=1 --quieter ${arg_u})"
info "Added ${arg_u} as ${_file_hash}"
@@ -388,7 +389,7 @@ if [[ -n ${arg_p} ]]; then
fi

if [[ -n ${arg_r} ]]; then
_new_dir="$(ipfs object patch ${arg_r} add-link $arg_u $_file_hash)"
_new_dir="$(ipfs object patch ${arg_r} add-link $_file_name $_file_hash)"
info "Placed ${arg_u} in directory, new root is ${_new_dir}"
fi


Loading…
取消
儲存