summaryrefslogtreecommitdiffstats
path: root/sync.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sync.sh')
-rwxr-xr-xsync.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/sync.sh b/sync.sh
index 5d415db..7fb9d0e 100755
--- a/sync.sh
+++ b/sync.sh
@@ -5,6 +5,7 @@
REPO="$HOME/Sandbox/hinode-template"
SRC="$REPO/public/"
DSRC="$REPO/docs-server/"
+DSRBTS="$DSRC/robots.txt"
REMOTE="216.189.157.213"
DST="/var/www/htdocs/corruptlamar"
DSDST="/var/www/htdocs/docs"
@@ -12,6 +13,9 @@ USERNAME="anoduck"
API="f18dd78af41a4d1ab6d15d7099522c61"
KEYFILE="$SRC/$API.txt"
# ------------------------------------------
+rbts="User-agent: *
+Disallow: /"
+# ------------------------------------------
# request='POST /IndexNow HTTP/1.1
# Content-Type: application/json; charset=utf-8
# Host: api.indexnow.org
@@ -39,12 +43,12 @@ INDATA='{
"https://corruptlamar.com/video",
]
}'
-INHEADER = "Content-Type: application/json; charset=utf-8"
-INHOST = "api.indexnow.org"
+INHEADER="Content-Type: application/json; charset=utf-8"
+INHOST="api.indexnow.org"
# ------------------------------------------
compush() {
git add .
- git commit -am $1
+ git commit -am "$1"
setver autopatch
}
@@ -74,6 +78,12 @@ generate_key() {
echo "$KEY" > "$KEYFILE"
fi
}
+
+generate_robots() {
+ if ! [[ -e "$DSRBTS" ]]; then
+ echo "$rbts" > "$DSRBTS"
+ fi
+}
# ------------------------------------------
if [[ ! "$PWD" == "$REPO" ]]; then
cd "$REPO" || return
@@ -81,7 +91,7 @@ fi
# compush
build
cd "$SRC" || return
-generate_key && indexnow
+generate_key && indexnow && generate_robots
#alt_files
echo "Skipping cleaning of alt files"
cd "$REPO" || return