futurefantasy commited on
Commit
b34b4a9
·
verified ·
1 Parent(s): c61ce1a

Delete old unpack script name

Browse files
scripts/extract_vlac2_release_raw_archives.sh DELETED
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- ARCHIVE_DIR="${ROOT_DIR}/data"
6
- DATA_ROOT="${1:-${ROOT_DIR}/data}"
7
- EXPECTED_BASES=(
8
- "test_videos"
9
- "train_videos"
10
- )
11
-
12
- mkdir -p "${DATA_ROOT}"
13
-
14
- archives=()
15
- for base in "${EXPECTED_BASES[@]}"; do
16
- matches=()
17
- for suffix in ".tar" ".tar.zst"; do
18
- candidate="${ARCHIVE_DIR}/${base}${suffix}"
19
- if [[ -f "${candidate}" ]]; then
20
- matches+=("${candidate}")
21
- fi
22
- done
23
-
24
- if [[ "${#matches[@]}" -eq 0 ]]; then
25
- echo "missing expected archive under ${ARCHIVE_DIR}: ${base}.tar or ${base}.tar.zst" >&2
26
- exit 1
27
- fi
28
- if [[ "${#matches[@]}" -gt 1 ]]; then
29
- echo "found multiple archive variants for ${base} under ${ARCHIVE_DIR}; keep only one of .tar or .tar.zst" >&2
30
- exit 1
31
- fi
32
-
33
- archives+=("${matches[0]}")
34
- done
35
-
36
- for archive in "${archives[@]}"; do
37
- echo "extracting ${archive}"
38
- case "${archive}" in
39
- *.tar.zst)
40
- tar --zstd -xf "${archive}" -C "${DATA_ROOT}"
41
- ;;
42
- *.tar)
43
- tar -xf "${archive}" -C "${DATA_ROOT}"
44
- ;;
45
- *)
46
- echo "unsupported archive format: ${archive}" >&2
47
- exit 1
48
- ;;
49
- esac
50
- done
51
-
52
- echo "raw data extracted into ${DATA_ROOT}"