update
This commit is contained in:
parent
32bf714970
commit
6f83c3053c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
content
|
||||
output
|
||||
__pycache__
|
||||
.password
|
||||
|
5
Makefile
5
Makefile
@ -46,10 +46,7 @@ help:
|
||||
|
||||
html:
|
||||
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
|
||||
pull:
|
||||
./sync-content.sh pull
|
||||
push:
|
||||
./sync-content.sh push
|
||||
|
||||
clean:
|
||||
[ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)"
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
server='https://nuage.jean-cloud.net'
|
||||
user="lexicographe"
|
||||
ncpath=content/
|
||||
password="$CLOUD_PASSWORD"
|
||||
if [ -z "$password" ] ; then
|
||||
password="$(cat .password)"
|
||||
fi
|
||||
if [ -z "$password" ] ; then
|
||||
echo "Aucun mot de passe trouvé"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
action="$1"
|
||||
if [ -z "$action" ] ; then
|
||||
action=pull
|
||||
fi
|
||||
|
||||
if [ "$action" = 'pull' ] ; then
|
||||
rclone sync --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) :webdav:"$ncpath" content
|
||||
elif [ "$action" = 'push' ] ; then
|
||||
rclone sync --webdav-url="$server/remote.php/webdav/" --webdav-vendor=nextcloud --webdav-user="$user" --webdav-pass=$(rclone obscure $password) content :webdav:"$ncpath"
|
||||
else
|
||||
echo "unknown action: $action"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user