aboutsummaryrefslogtreecommitdiff
path: root/upload.sh
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-24 05:09:11 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-24 05:31:35 +0100
commit6082be0b18038225829674aed07752c391991ef6 (patch)
treed2bb82ba1fff3b1d70bc1869679ca3ecf838c0c9 /upload.sh
First commit, just a place holder until page is made
This is just a place holder that I made in a few minutes after setting up the `maneage.org' domain. We will fill it up soon.
Diffstat (limited to 'upload.sh')
-rwxr-xr-xupload.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/upload.sh b/upload.sh
new file mode 100755
index 0000000..611be5a
--- /dev/null
+++ b/upload.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+
+# Run this script to synchronize the server with your local system. It
+# takes one argument: the user@server which will be passed to rsync
+# (which uses SSH).
+#
+# This script has to be run within the directory containing
+# `index.html'.
+#
+# Copyright (C) 2016-2020, Mohammad Akhlaghi <mohammad@akhlaghi.org>
+#
+# This file is part of Maneage. Maneage is free software: you can
+# redistribute it and/or modify it under the terms of the GNU General
+# Public License as published by the Free Software Foundation, either
+# version 3 of the License, or (at your option) any later version.
+#
+# Maneage is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details. See <http://www.gnu.org/licenses/>.
+
+
+# First check if the user@server argument is correct.
+if [ x$1 = x"" ]; then
+ echo "No argument was given."
+ echo "A single argument in the format of user@server is necessary, it will be passed directly to rsync (which will use it with SSH)."
+ exit 1
+fi
+
+# Run rsync to upload the necessary files
+rsync -azv --exclude '*~' --exclude '*#' --exclude ".git" --exclude "pdf" \
+ --no-links --rsh=ssh ./* $1