2021-02-07 00:05:27 +00:00
|
|
|
#!/usr/bin/fish
|
|
|
|
|
|
|
|
set TECHS_FILE /tmp/techs.txt
|
|
|
|
|
|
|
|
echo -n > $TECHS_FILE
|
|
|
|
|
|
|
|
for line in (cat Dockerfile | grep "RUN build_")
|
|
|
|
set VERSION (echo $line | cut -d " " -f 3)
|
|
|
|
set TECH_SCRIPT (echo $line | cut -d " " -f 2)
|
|
|
|
|
|
|
|
switch $TECH_SCRIPT
|
|
|
|
case "build_php.sh"
|
|
|
|
set TECH php
|
|
|
|
set TECH_VERBOSE PHP
|
2021-03-05 23:39:20 +00:00
|
|
|
case "build_php8.sh"
|
|
|
|
set TECH php
|
|
|
|
set TECH_VERBOSE PHP
|
2021-02-07 00:05:27 +00:00
|
|
|
case "build_python.sh"
|
|
|
|
set TECH python
|
|
|
|
set TECH_VERBOSE Python
|
|
|
|
case "build_node.sh"
|
|
|
|
set TECH node
|
|
|
|
set TECH_VERBOSE Node
|
|
|
|
case "build_ruby.sh"
|
|
|
|
set TECH ruby
|
|
|
|
set TECH_VERBOSE Ruby
|
|
|
|
case "build_deno.sh"
|
|
|
|
set TECH deno
|
|
|
|
set TECH_VERBOSE Deno
|
|
|
|
case '*'
|
|
|
|
set TECH unknown
|
|
|
|
end
|
|
|
|
|
|
|
|
echo " \"$TECH-$VERSION\" \" $TECH_VERBOSE $VERSION\" \\" >> $TECHS_FILE
|
|
|
|
end
|
|
|
|
|
2021-12-03 17:58:56 +00:00
|
|
|
cat rosti.tmpl.sh | while read -l line
|
2021-02-07 00:05:27 +00:00
|
|
|
if [ "$line" = "{{TECHS}}" ]
|
|
|
|
cat $TECHS_FILE
|
|
|
|
else
|
|
|
|
echo $line
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|