txlyre 2 zile în urmă
părinte
comite
a4ac2d71bf
5 a modificat fișierele cu 12 adăugiri și 5 ștergeri
  1. 8 5
      buildall.sh
  2. 1 0
      langs/elixir/debian.ver
  3. 1 0
      langs/forth/debian.ver
  4. 1 0
      langs/nim/debian.ver
  5. 1 0
      langs/scala/debian.ver

+ 8 - 5
buildall.sh

@@ -1,9 +1,5 @@
 #!/usr/bin/bash
 
-read -r -d '' START << EOM
-FROM debian:latest
-RUN apt update -y
-EOM
 read -r -d '' END << EOM
 RUN apt-get clean autoclean
 RUN apt-get autoremove --yes
@@ -17,6 +13,12 @@ cd langs
 
 for dir in */
 do
+    if [ -f "$dir/debian.ver" ]; then
+      debver="$(cat $dir/debian.ver)"
+    else
+      debver="latest"
+    fi
+
     dir="${dir%*/}"
 
     if podman image exists "$dir-runner"; then
@@ -40,7 +42,8 @@ fi
 $run_sh
 " > "Run$dir.sh"
 
-    echo "$START
+    echo "FROM debian:$debver
+RUN apt update -y
 $template
 
 COPY Run$dir.sh /usr/bin/run

+ 1 - 0
langs/elixir/debian.ver

@@ -0,0 +1 @@
+12

+ 1 - 0
langs/forth/debian.ver

@@ -0,0 +1 @@
+12

+ 1 - 0
langs/nim/debian.ver

@@ -0,0 +1 @@
+12

+ 1 - 0
langs/scala/debian.ver

@@ -0,0 +1 @@
+12