os-init/debian-up.sh
2025-06-01 02:28:01 +02:00

21 lines
408 B
Bash

#!/bin/bash
declare BASE_URL=https://git.netm.ch/m/os-init/raw/branch/main
declare DEBVER=0
declare DEBVERUP=0
getVer() {
DEBVER=$(grep "VERSION_ID=" /etc/os-release | sed 's/"//g' | sed 's/.*=//')
DEBVERUP=$((DEBVER+1))
}
run() {
apt update -y
apt install -y wget
wget -P /tmp ${BASE_URL}/debain-${DEBVERUP}/debian-${DEBVER}to${DEBVERUP}.sh
bash /tmp/debian-${DEBVER}to${DEBVERUP}.sh
}
getVer
run