-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPublish.cmd
37 lines (26 loc) · 959 Bytes
/
Publish.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
REM ~ Make the directory current where this batch file is from
cd %~p0
REM ~ And then step into the build dir
cd build/html
REM ~ Which user is going to push the changes?
set idUser=1
echo Who are you?
echo 1 - Tino
echo 2 - Sergiu
set /p idUser="Enter your number: "
REM ~ Default: Tino
set UserName="niteria"
if %idUser% == 2 (set UserName="sergiudotenco")
REM ~ Create a list for review
echo.
rsync --verbose --rsh=ssh --checksum --times --recursive --dry-run --exclude=/_sources --exclude=/.buildinfo --exclude=/objects.inv ./ %UserName%,[email protected]:htdocs/ | grep -v ".*/$"
echo.
echo Is the list of files ok?
echo.
timeout /T 30
REM ~ Do the actual sync
echo.
rsync --verbose --rsh=ssh --checksum --times --recursive --exclude=/_sources --exclude=/.buildinfo --exclude=/objects.inv ./ %UserName%,[email protected]:htdocs/ | grep -v ".*/$"
echo.
timeout /T 30