diff --git a/compose.yml b/compose.yml index 4adc544..7539e8e 100644 --- a/compose.yml +++ b/compose.yml @@ -25,9 +25,10 @@ services: volumes: - ./data/pmb/:/data - ./conf/pmb/:/conf - - ./pmb/setup:/setup-pmbootstrap + - ./pmb/setup:/setup-pmb + - ./pmb/update:/update-pmb - ./pmb/pmbootstrap:/usr/bin/pmbootstrap - ./pmb/pmbootstrap.cfg:/pmbootstrap.cfg - ./pmb/env:/data/.env - command: "/setup-pmbootstrap" + command: "/setup-pmb" privileged: true diff --git a/pmb/setup b/pmb/setup index ababa0d..316d3dc 100755 --- a/pmb/setup +++ b/pmb/setup @@ -1,13 +1,4 @@ #!/bin/sh /setup-runner -apk add python3 losetup cmd:kpartx openssl -git clone https://git.nekocwd.duckdns.org/Mirror/pmbootstrap /data/pmbootstrap || true -git clone https://git.nekocwd.duckdns.org/Mirror/pmaports /data/pmaports || true -git clone https://git.nekocwd.duckdns.org/Mirror/aports /data/aports || true -git -C /data/pmaports remote add postmarketos https://gitlab.postmarketos.org/postmarketOS/pmaports.git || true -git -C /data/pmaports fetch postmarketos --depth=1 -f || true -yes '' | pmbootstrap init -pmbootstrap config mirrors.alpine https://mirror.nekocwd.duckdns.org/alpine/ -pmbootstrap config mirrors.pmaports https://mirror.nekocwd.duckdns.org/postmarketos/ -pmbootstrap config mirrors.systemd https://mirror.nekocwd.duckdns.org/postmarketos/extra-repos/systemd/ +/update-pmb /run-runner diff --git a/pmb/update b/pmb/update new file mode 100755 index 0000000..0b700a9 --- /dev/null +++ b/pmb/update @@ -0,0 +1,21 @@ +#!/bin/sh +echo "Install dependencies" +apk add python3 losetup cmd:kpartx openssl +echo "Clone repos" +git clone https://git.nekocwd.duckdns.org/Administration/pmbootstrap-meow /data/pmbootstrap || true +git clone https://git.nekocwd.duckdns.org/Mirror/pmaports /data/pmaports || true +git clone https://git.nekocwd.duckdns.org/Mirror/aports /data/aports || true +echo "Fetch latest changes" +git -C /data/pmbootstrap fetch +git -C /data/pmaports fetch +git -C /data/aports fetch +git -C /data/pmbootstrap reset --hard origin/master +git -C /data/pmaports reset --hard origin/master +git -C /data/aports reset --hard origin/master +echo "Init pmbootstrap" +yes '' | pmbootstrap init +echo "Configure pmbootstrap to use internal mirrors" +pmbootstrap config mirrors.alpine https://mirror.nekocwd.duckdns.org/alpine/ +pmbootstrap config mirrors.pmaports https://mirror.nekocwd.duckdns.org/postmarketos/ +pmbootstrap config mirrors.systemd https://mirror.nekocwd.duckdns.org/postmarketos/extra-repos/systemd/ +echo "That's all <3"