summaryrefslogtreecommitdiffstats
path: root/redhat/docker/pclinuxos.sh
diff options
context:
space:
mode:
authorFrançois Andriot <[email protected]>2021-01-30 14:34:02 +0100
committerFrançois Andriot <[email protected]>2021-01-30 22:29:41 +0100
commit6581dc50b83f203d65eac61c00a159ab2a6ddb5d (patch)
tree85c02d38ca9dcedc28798ee41c4b16ec7260e9bc /redhat/docker/pclinuxos.sh
parent87e57a1a070839a44db16a0410ef57902db2df3e (diff)
downloadtde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.tar.gz
tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.zip
RPM: massive update and cleanup
Diffstat (limited to 'redhat/docker/pclinuxos.sh')
-rwxr-xr-xredhat/docker/pclinuxos.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/redhat/docker/pclinuxos.sh b/redhat/docker/pclinuxos.sh
index e4ed68567..837e4c86f 100755
--- a/redhat/docker/pclinuxos.sh
+++ b/redhat/docker/pclinuxos.sh
@@ -1,7 +1,7 @@
#!/bin/bash -ex
NAME="pclinuxos"
-VERSION="$1" # E.g: '26'
+VERSION="${1:-2020}" # E.g: '26'
IMAGE="${NAME}:${VERSION}"
INSTALLROOT="/dev/shm/${IMAGE}"
@@ -17,7 +17,7 @@ curl "${MIRROR}/RPMS.x86_64/" | sed -n "/a href/ s|.*href=\"\(.*\)\.rpm\".*|\1.r
mkdir -p "/dev/shm/packages"
while read pkg; do
- file="$(grep "^$pkg-[0-9]" /dev/shm/pkg.list)"
+ file="$(grep "^${pkg}[0-9]*-[0-9]" /dev/shm/pkg.list | sort | tail -n 1)"
[ -z "${file}" ] && exit 1
wget -nv -c "${MIRROR}/RPMS.x86_64/${file}" -O "/dev/shm/packages/${file}" || exit 2
done < "pclinuxos.pkg"
@@ -46,7 +46,7 @@ sudo umount "${INSTALLROOT}/dev/shm"
sudo umount "${INSTALLROOT}/dev"
sudo tar -C "${INSTALLROOT}" -c . >"${IMAGE}.tar"
-sudo rm -rf "${INSTALLROOT}"
+#sudo rm -rf "${INSTALLROOT}"
docker rmi -f "${IMAGE}"
docker import "${IMAGE}.tar" "${IMAGE}"