Skip to content

Commit

Permalink
Add script to generate a source skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jun 15, 2022
1 parent 85a0b4f commit cb7fb0d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/create-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Create the skeleton source code for a new source
# Usage: ./scripts/create-source.sh "Source Name" "www.source-domain.com"

NAME=$1
DOMAIN=$2

# Create source
DIR="src/sites/$NAME"
mkdir -p "$DIR"
echo $DOMAIN > "$DIR/sites.txt"
echo $DOMAIN > "$DIR/supported.txt"
touch "$DIR/model.ts"
wget -qO- "https://$DOMAIN/favicon.ico" | convert ico:- "$DIR/icon.png"

# Create site
DIR_SITE="$DIR/$DOMAIN"
mkdir -p "$DIR_SITE"
echo -e "[General]\nname=$NAME\nssl=true" > "$DIR_SITE/defaults.ini"

0 comments on commit cb7fb0d

Please sign in to comment.