Create a separate dotenv generator

This commit is contained in:
zontreck 2024-11-09 13:24:59 -07:00
parent 841ac975ef
commit 3ad6559ef6
2 changed files with 26 additions and 18 deletions

24
mkdotenv.sh Normal file
View file

@ -0,0 +1,24 @@
#!/bin/bash
echo -ne "AGENT=" > .env
cat "$AGENT" >> .env
echo -ne "\nPUB=" >> .env
cat "$PUB" >> .env
echo -ne "\nFSAGENT=" >> .env
cat "$FSAGENT" >> .env
mkdir -pv LinuxGeneralCompiler/FinalStage/secret
cp "$PRIVKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa
cp "$PUBKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa.pub
cp "$GRADLEPROP" LinuxGeneralCompiler/FinalStage/secret/gradle.properties
cp -rv LinuxGeneralCompiler/FinalStage/secret ArchAgent/secret
echo -ne "\nARCHAGENT=" >> .env
cat "$ARCHAGENT" >> .env
echo -ne "\nDINDAGENT=" >> .env
echo "NAN" >> .env

20
run.sh
View file

@ -1,23 +1,7 @@
#!/bin/bash
echo -ne "AGENT=" > .env
cat "$AGENT" >> .env
echo -ne "\nPUB=" >> .env
cat "$PUB" >> .env
echo -ne "\nFSAGENT=" >> .env
cat "$FSAGENT" >> .env
mkdir -pv LinuxGeneralCompiler/FinalStage/secret
cp "$PRIVKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa
cp "$PUBKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa.pub
cp "$GRADLEPROP" LinuxGeneralCompiler/FinalStage/secret/gradle.properties
cp -rv LinuxGeneralCompiler/FinalStage/secret ArchAgent/secret
echo -ne "\nARCHAGENT=" >> .env
cat "$ARCHAGENT" >> .env
chmod +x mkdotenv.sh
./mkdotenv.sh
docker build -t linuxagent LinuxGeneralCompiler/FinalStage
docker build -t archagent ArchAgent