diff --git a/mkdotenv.sh b/mkdotenv.sh new file mode 100644 index 0000000..25e5718 --- /dev/null +++ b/mkdotenv.sh @@ -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 \ No newline at end of file diff --git a/run.sh b/run.sh index cdcb8fb..02dcb73 100644 --- a/run.sh +++ b/run.sh @@ -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