From ce668650dde7d07d389a1442f5d51a77ce806b3f Mon Sep 17 00:00:00 2001
From: j <okp57855@psoxs.com>
Date: Wed, 28 Feb 2018 19:50:00 +1300
Subject: [PATCH] Noob error, forgot to login before putting.

---
 devTools/AutoGitVersionUploadBackground.sh | 2 +-
 devTools/AutoGitVersionUploadForground.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/devTools/AutoGitVersionUploadBackground.sh b/devTools/AutoGitVersionUploadBackground.sh
index cb5a7c2b030..8f3dcc93824 100644
--- a/devTools/AutoGitVersionUploadBackground.sh
+++ b/devTools/AutoGitVersionUploadBackground.sh
@@ -6,7 +6,7 @@ while [ $COUNTER -ge 0 ]; do
 	cd $LocalDir/ && AbrevHash=`git log --reverse -n1 --abbrev-commit |grep -m1 commit | sed 's/commit //'`
 	if [ $COUNTER -eq 0 ]; then ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir
 	else if [ "$(git pull)" == "Already up to date." ]; then exit
-		else rm bin/*.html ; .compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir
+		else rm bin/*.html ; .compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-login $U $P && mega-put bin/*.html $RemoteDir
 		fi
 	fi	
 	let COUNTER=COUNTER+1 && mega-logout > /dev/null && sleep 300s
diff --git a/devTools/AutoGitVersionUploadForground.sh b/devTools/AutoGitVersionUploadForground.sh
index 13e742e1ac5..1dd3ac6f939 100644
--- a/devTools/AutoGitVersionUploadForground.sh
+++ b/devTools/AutoGitVersionUploadForground.sh
@@ -6,7 +6,7 @@ while [ $COUNTER -ge 0 ]; do
 	cd $LocalDir/ && AbrevHash=`git log -n1 --reverse --abbrev-commit |grep -m1 commit | sed 's/commit //'`
 	if [ $COUNTER -eq 0 ]; then echo "First run. Compliling, formatting and placing .html." && ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir && echo "Inital compiled .html placed."
 	else if [ "$(git pull)" == "Already up to date." ]; then echo "No updated files."
-		else echo "Compliling, formatting and placing updated .html." ; rm bin/*.html ; ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir ; echo "Updated .html placed."
+		else echo "Compliling, formatting and placing updated .html." ; rm bin/*.html ; ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-login $U $P && mega-put bin/*.html $RemoteDir ; echo "Updated .html placed."
 		fi
 	fi	
 	let COUNTER=COUNTER+1 && mega-logout > /dev/null && sleep 300s
-- 
GitLab