Skip to content
Snippets Groups Projects
Commit 6ede0627 authored by j's avatar j
Browse files

Updated.

parent a76ba905
No related branches found
No related tags found
1 merge request!1267Updated.
## Requires megatools
LocalDIR=~/fc-pregmod/
RemoteDIR=FCGIT
Uname=anon
Upass=13245
cd $LocalDIR/
git pull
rm bin/*.html
./compile-git
mv bin/*.html bin/html/
megacopy -l bin/html/ -r /Root/$RemoteDIR --disable-previews --no-ask-password -u $Uname -p $Upass
## Requires MEGAcmd, git, mv, cd, mkidr, echo
#!/bin/sh
LocalDir=~/fc-pregmod/
RemoteDir=FCGIT
U=anon@anon.anon
P=13245
mega-login $U $P
if [[ $1 = "-NewStart" ]]; then
echo "Option -NewStart is on"
mega-mkdir $RemoteDir
mega-export -a $RemoteDir
mkdir $LocalDir
git clone https://gitgud.io/pregmodfan/fc-pregmod.git $LocalDir
cd $LocalDir/
AbrevHash=`git log -n1 --abbrev-commit |grep -m1 commit | sed 's/commit //'`
FullHash=`git log -n1 |grep -m1 commit | sed 's/commit //'`
rm bin/*.html & git pull
./compile-git > /dev/null
mv bin/*.html "bin/FC-pregmod-CommitDate-$(date '+%F %H-%M' --utc --date="$(git show '--format=format:%cD' HEAD)").html"
mega-put bin/*.html $RemoteDir
mega-logout
echo "All done."
else
echo "Option -NewStart is off"
cd $LocalDir/
AbrevHash=`git log -n1 --abbrev-commit |grep -m1 commit | sed 's/commit //'`
FullHash=`git log -n1 |grep -m1 commit | sed 's/commit //'`
rm bin/*.html & git pull
./compile-git > /dev/null
mv bin/*.html "bin/FC-pregmod-CommitDate-$(date '+%F %H-%M' --utc --date="$(git show '--format=format:%cD' HEAD)").html"
mega-put bin/*.html $RemoteDir
mega-logout
echo "All done."
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment