1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 19:07:54 +01:00

change script

This commit is contained in:
Jason N. 2024-04-01 08:49:01 -04:00
parent 76edeb887c
commit f8f448e94f
5 changed files with 149 additions and 29 deletions

51
test/repo/vars_copy.sh Executable file
View file

@ -0,0 +1,51 @@
#!/bin/bash
exit 0
makefile = open('../../Makefile.inputs', 'r')
makefile_lines = makefile.readlines()
vars = []
for line in makefile_lines:
if line.startswith('#'):
makefile_lines.remove(line)
parts = line.split('=', 1)
vars += { parts[0]: parts[1] }
print(vars)
vars=()
default_values=()
while read -r line
do
if ! [[ $line =~ ^# ]]
then
vars+=$(echo $line | cut -d= -f1 | tr [:upper:] [:lower:])
fi
done < ../../Makefile.inputs
result=0
for var in $vars
do
grep "^| ${var}" README.md > /dev/null
if [[ $? != 0 ]]
then
echo "$var not found in README.md"
result=1
fi
done
for var in $vars
do
grep "^ ${var}:" action.yml > /dev/null
if [[ $? != 0 ]]
then
echo "$var not found in action.yml"
result=1
fi
done
exit ${result}