tangled
alpha
login
or
join now
zio.sh
/
atfile
37
fork
atom
๐ฆโ๐ฆ Store and retrieve files on the Atmosphere
37
fork
atom
overview
issues
3
pulls
pipelines
fix potential problems during sudo installation
ducky.ws
5 months ago
ceb12989
9fd14fbe
1/1
build.yaml
success
7s
+5
-8
3 changed files
expand all
collapse all
unified
split
src
commands
old_cmds.sh
entry.sh
shared
util.sh
+3
-1
src/commands/old_cmds.sh
reviewed
···
316
316
actor="$(echo "$uri" | cut -d "/" -f 3)"
317
317
key="$(echo "$uri" | cut -d "/" -f 4)"
318
318
319
319
+
atfile.util.create_dir "$_path_blobs_tmp"
320
320
+
319
321
if [[ -n "$actor" && -n "$key" ]]; then
320
322
atfile.util.override_actor "$actor"
321
323
···
355
357
356
358
download_success=1
357
359
# shellcheck disable=SC2154
358
358
-
tmp_path="$_path_blobs_tmp/$blob_cid"
360
360
+
tmp_path="$_path_blobs_tmp/$blob_cid$(atfile.util.get_cache_path "$blob_cid")"
359
361
360
362
if ! [[ -f "$tmp_path" ]]; then
361
363
atfile.say.debug "Downloading '$blob_cid'..."
-7
src/entry.sh
reviewed
···
277
277
fi
278
278
fi
279
279
280
280
-
## Directory creation
281
281
-
282
282
-
if [[ $_disable_setup_dir_creation == 0 ]]; then
283
283
-
atfile.util.create_dir "$_path_cache"
284
284
-
atfile.util.create_dir "$_path_blobs_tmp"
285
285
-
fi
286
286
-
287
280
## Program detection
288
281
289
282
_prog_hint_jq="https://jqlang.github.io/jq"
+2
src/shared/util.sh
reviewed
···
183
183
184
184
function atfile.util.get_cache_path() {
185
185
# shellcheck disable=SC2154
186
186
+
mkdir -fp "$_path_cache"
187
187
+
# shellcheck disable=SC2154
186
188
echo "$_path_cache/$1"
187
189
}
188
190