Skip to content

Commit c0f3378

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0bd5a0b + 372977d commit c0f3378

9 files changed

Lines changed: 48 additions & 111 deletions

File tree

‎.dbwebb.config‎

Lines changed: 0 additions & 72 deletions
This file was deleted.

‎.pylintrc‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
init-hook='import sys; import os; sys.path.append(os.getcwd() + "/example/hello_world")'
33

44

5+
56
[MESSAGES CONTROL]
7+
68
#disable=superfluous-parens,anomalous-backslash-in-string,bad-builtin,invalid-name
7-
disable=W0141,C0103
9+
disable=W0105,W0141,C0103,R0903
10+
11+
12+
13+
[FORMAT]
14+
15+
# Maximum number of characters on a single line.
16+
max-line-length=100
17+
818

919

1020
[REPORTS]
21+
1122
reports=no
1223
include-ids=yes

‎bin/dbwebb‎

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ executeCommand()
7070
$ECHO "\nPress a key to continue..."
7171
read void
7272
fi
73-
73+
7474
COMMAND=$2
7575

7676
if [ $VERY_VERBOSE = "yes" ]
@@ -80,7 +80,7 @@ executeCommand()
8080
$ECHO "\n-----------------------------------------"
8181
$ECHO "\n"
8282
fi
83-
83+
8484
sh -c "$COMMAND"
8585
STATUS=$?
8686

@@ -93,9 +93,9 @@ executeCommand()
9393
if [ $STATUS = 0 ]
9494
then
9595
$ECHO "\n$MSG_OK $MESSAGE"
96-
else
96+
else
9797
$ECHO "\n$MSG_FAILED $MESSAGE"
98-
fi
98+
fi
9999
$ECHO "\n"
100100
$ECHO "\n"
101101

@@ -140,8 +140,8 @@ installSshKeys()
140140
if [ ! -d $HOME/.ssh ]
141141
then
142142
mkdir $HOME/.ssh
143-
fi
144-
143+
fi
144+
145145
INTRO="First we need to create a ssh key and store it locally."
146146
COMMAND="ssh-keygen -t dsa -f $SSH_KEY -N ''"
147147
MESSAGE="to create the ssh key."
@@ -172,16 +172,19 @@ createConfig()
172172
{
173173
FIRST=$1
174174

175-
if [ -z "$COURSE" ]; then
175+
if [ -z "$COURSE" ]
176+
then
176177
GUESS_COURSE=${PWD##*/}
177178
else
178179
GUESS_COURSE=$COURSE
179180
fi
180181

181-
if [ -z $FIRST ]; then
182+
if [ -z $FIRST ]
183+
then
182184
$ECHO "Welcome to dbwebb utility! It seems like its your first time here?\n"
183185
$ECHO "I'm missing the configuration file."
184-
elif [ $FIRST = "update" ]; then
186+
elif [ $FIRST = "update" ]
187+
then
185188
$ECHO "You need to update your configuration file.\n"
186189
fi
187190

@@ -193,11 +196,6 @@ createConfig()
193196
$ECHO "\nThe config file \".dbwebb.config\" is now created."
194197
$ECHO "\nYou can always re-create the config-file by running the command:"
195198
$ECHO "\n bin/dbwebb config\n"
196-
197-
#if [ -z $FIRST -o "$FIRST" = "update" ]
198-
#then
199-
# $ECHO "You can now re-run your initial command.\n"
200-
#fi
201199
}
202200

203201

@@ -298,8 +296,8 @@ publishResults()
298296
if [ $? -eq 0 ]
299297
then
300298
$ECHO "Your files are now"
301-
else
302-
$ECHO "Some of your files may might be"
299+
else
300+
$ECHO "Some of your files might be"
303301
fi
304302
$ECHO " published on $BASEURL"
305303
$ECHO "\n"
@@ -318,7 +316,7 @@ fi
318316
# Get settings from config-file
319317
if [ ! -f ".dbwebb.config" ]
320318
then
321-
createConfig
319+
createConfig
322320
$ECHO "\nYou can now re-run your command.\n"
323321
exit
324322
fi
@@ -331,7 +329,7 @@ then
331329
exit
332330
fi
333331

334-
UPLOAD="rsync -av --delete --exclude literature --exclude .git -e \"ssh $SSH_KEY_OPTION\" $SOURCE $DESTINATION"
332+
UPLOAD="rsync -av --delete --exclude literature --exclude .git -e \"ssh $SSH_KEY_OPTION\" $SOURCE $DESTINATION"
335333
SSH="ssh ${USER}@${HOST} $SSH_KEY_OPTION"
336334

337335

@@ -344,24 +342,24 @@ VERY_VERBOSE="no"
344342
while getopts ":hivwy" opt
345343
do
346344
case $opt in
347-
(h)
345+
(h)
348346
printUsage
349347
;;
350348

351-
(i)
349+
(i)
352350
IGNORE_FAULTS="-i"
353351
;;
354352

355-
(v)
353+
(v)
356354
$ECHO "$VERSION\n"
357355
exit 0
358356
;;
359357

360-
(w)
358+
(w)
361359
VERY_VERBOSE="yes"
362360
;;
363361

364-
(y)
362+
(y)
365363
SKIP_READLINE="yes"
366364
;;
367365

@@ -381,21 +379,21 @@ shift $((OPTIND - 1))
381379
# Execute command
382380
CMD=$1
383381
case $CMD in
384-
382+
385383
config)
386384
createConfig "second"
387385
;;
388386

389387
test)
390-
testConnection
388+
testConnection
391389
;;
392390

393391
login)
394-
loginToServer
392+
loginToServer
395393
;;
396394

397395
sshkey)
398-
installSshKeys
396+
installSshKeys
399397
;;
400398

401399
init)
@@ -405,11 +403,11 @@ case $CMD in
405403
;;
406404

407405
update)
408-
updateFromMaster
406+
updateFromMaster
409407
;;
410408

411409
upload)
412-
uploadToServer
410+
uploadToServer
413411
;;
414412

415413
create)
@@ -419,17 +417,17 @@ case $CMD in
419417
echo "Missing name for lab, perhaps use lab1, lab2 or lab3?"
420418
exit 1
421419
fi
422-
createLab "$LAB"
420+
createLab "$LAB"
423421
;;
424422

425423
validate)
426424
WHICH=$2
427-
validateUploadedResults ${WHICH:=all}
425+
validateUploadedResults ${WHICH:=all}
428426
;;
429427

430428
publish)
431429
WHICH=$2
432-
publishResults ${WHICH:=all}
430+
publishResults ${WHICH:=all}
433431
;;
434432

435433
*)

‎example/cgi/execute-another-file.cgi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

‎example/cgi/execute-another-file.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

‎example/cgi/hello-web.cgi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

‎example/cgi/serve-as-html.cgi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

‎example/cgi/serve-as-text.cgi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

‎example/hello_world/hello.cgi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

44
"""

0 commit comments

Comments
 (0)