xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/root/bin/ziprun

18 lines
359 B
Plaintext
Raw Normal View History

2024-11-20 15:40:17 +01:00
#!/bin/sh
set -e # halt on error
file="$1"
dir="$(basename "$file")"
logger "$0: extracting $file"
mkdir -p "/root/$dir"
cd "/root/$dir"
unzip "$file"
2025-01-09 12:14:26 +01:00
cd "/root/$dir" # trigger auto-env (.env file)
2024-11-20 15:40:17 +01:00
2024-12-13 14:31:33 +01:00
test -f .env && test "$(cat ~/.config/autoenv/package)" = 1 && {
logger "$0: detected $(pwd)/.env [autoenv]"
logger "$0: running $(pwd)/.env"
2024-12-13 14:31:33 +01:00
sh .env
2024-11-20 15:40:17 +01:00
}