tao-shen commited on
Commit
dc5f63f
·
verified ·
1 Parent(s): 6607d1a

Upload scripts/ensure_structure.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/ensure_structure.sh +20 -0
scripts/ensure_structure.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Survival: Ensure data directory structure exists
3
+ # This prevents FileNotFound crashes during cold starts
4
+
5
+ DATA_DIR="/data"
6
+ BACKUP_DIR="/data/logs"
7
+
8
+ echo "[Survival] Checking environment..."
9
+
10
+ if [ ! -d "$DATA_DIR" ]; then
11
+ echo "[Survival] Creating missing data directory: $DATA_DIR"
12
+ mkdir -p "$DATA_DIR"
13
+ fi
14
+
15
+ if [ ! -d "$BACKUP_DIR" ]; then
16
+ echo "[Survival] Creating backup directory: $BACKUP_DIR"
17
+ mkdir -p "$BACKUP_DIR"
18
+ fi
19
+
20
+ echo "[Survival] Environment structure verified."