licencing gplv3

This commit is contained in:
Amber 2021-06-12 21:48:13 +02:00
parent 73011c3593
commit 44909815cd
4 changed files with 54 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*swp

View File

@ -1,7 +1,23 @@
#!/bin/bash
# Copyright 2021 Luca Paris
#This file is part of masync.
#masync 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.
#masync 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 masync. If not, see <http://www.gnu.org/licenses/>.
# $1 -> hash sync
# $2 -> LOCAL PATH -> /home/luca/test/
# $3 -> REMOTE PATH -> notanamber@myvps:/home/notanamber/sydir/ [avoid to copy remote in source]
# $2 -> LOCAL PATH
# $3 -> REMOTE PATH -> user@myvps:/home/user/syncdir/ [trailing / avoids to copy remote folder in source]
sync() {
src=$2
dest=$3

View File

@ -1,4 +1,20 @@
#!/bin/bash
# Copyright 2021 Luca Paris
#This file is part of masync.
#masync 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.
#masync 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 masync. If not, see <http://www.gnu.org/licenses/>.
source ~/bin/.synccmd.sh
SYNCFILE=~/.syncdir.sync
MYPID=$$
@ -9,16 +25,16 @@ RED="\e[31m"
GREEN="\e[32m"
ENDCOLOR="\e[0m"
HELP_CMD_NAME='syncdir.sh'
HELP_CMD_NAME='masync'
HELP_LOCAL_DIR="/home/$USER/localsync/"
HELP_REMOTE_DIR="remoteuser@server:/home/remoteuser/sync/"
myhelp() {
echo "Usage: ${HELP_CMD_NAME} {COMMAND} [OPTION]"
echo 'Description: '
echo -e '\tThis tool allows you to mirror and keep synchronised a folder on a remote server with an arbitrary local folder.'
echo -e '\tThis tool allows you to mirror and keep synchronised one or more folders on a remote server with arbitraries local folders.'
echo -e '\tIt has three main commands init, start, stop, remove'
echo -e "\t${RED}NOTE: you must have configured ssh on your remote server!${ENDCOLOR}"
echo -e "\tNOTE: Before using it, you must have configured ssh on your remote server!"
echo -e "\tthe typical use is to start a sync with the command"
echo -e "\t\t${HELP_CMD_NAME} init -l ${HELP_LOCAL_DIR} -r ${HELP_REMOTE_DIR}"
echo -e "\tAbove command starts to mirror and sync the local folder ${HELP_LOCAL_DIR} with the remote folder ${HELP_REMOTE_DIR}"

View File

@ -1,4 +1,20 @@
#!/bin/bash
# Copyright 2021 Luca Paris
#This file is part of masync.
#masync 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.
#masync 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 masync. If not, see <http://www.gnu.org/licenses/>.
## REQUIREMENT
# apt-get install inotify-tools
# @1 hash to retrieve sync