Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-11-26 18:56:23 +0300
committernachoparker <nacho@ownyourbits.com>2017-11-26 18:56:23 +0300
commit98c664938f0133fc351bbfe435d85c4a4e896514 (patch)
tree618622a59eac7f552854c4aaa0206833825f8fdc /buildlib.sh
parent39064cc5fc718c1419acf4cad17d32d8114bcbe2 (diff)
build: autoupload ftp
Diffstat (limited to 'buildlib.sh')
-rw-r--r--buildlib.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/buildlib.sh b/buildlib.sh
index ec494d46..13d6068e 100644
--- a/buildlib.sh
+++ b/buildlib.sh
@@ -237,3 +237,49 @@ function prepare_sshd()
sudo umount tmpmnt
rmdir tmpmnt
}
+
+function upload_ftp()
+{
+ local IMGNAME="$1"
+ [[ -f "$IMGNAME" ]] || { echo "No image file found, abort"; return 1; }
+ [[ "$FTPPASS" == "" ]] && { echo "No FTPPASS variable found, abort"; return 1; }
+
+ cd torrent
+
+ ftp -np ftp.ownyourbits.com <<EOF
+user root@ownyourbits.com $FTPPASS
+mkdir $IMGNAME
+cd $IMGNAME
+binary
+put $IMGNAME.torrent
+bye
+EOF
+ cd -
+ cd $IMGNAME
+
+ ftp -np ftp.ownyourbits.com <<EOF
+user root@ownyourbits.com $FTPPASS
+cd $IMGNAME
+binary
+put $IMGNAME.tar.bz2
+bye
+EOF
+ cd -
+}
+
+# License
+#
+# This script 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 2 of the License, or
+# (at your option) any later version.
+#
+# This script 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this script; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA