Skip to content

Commit

Permalink
Add the new "placeholders" and flags feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
prplwtf committed Apr 17, 2023
1 parent 6c54eda commit f692738
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions blueprint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,24 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
rm $ZIP;
cd ..;
fi;


cd /var/www/pterodactyl;

eval $(parse_yaml .blueprint/tmp/$3/conf.yml)

if [[ $flags == *"-placeholders.skip;"* ]]; then
DIR=.blueprint/tmp/$3/*;

# ^#version#^ = version
# ^#author#^ = author

for f in $DIR; do
sed -i "s~^#version#^~$version~g" $f;
sed -i "s~^#author#^~$author~g" $f;
done;
fi;

if [[ $name == "" ]]; then rm -R .blueprint/tmp/$3; error "'name' is a required option.";fi;
if [[ $identifier == "" ]]; then rm -R .blueprint/tmp/$3; error "'identifier' is a required option.";fi;
if [[ $description == "" ]]; then rm -R .blueprint/tmp/$3; error "'description' is a required option.";fi;
Expand Down

0 comments on commit f692738

Please sign in to comment.