Browse Source

correct help and description for each script

nas 3 years ago
parent
commit
32645ef149
4 changed files with 4 additions and 6 deletions
  1. 1
    1
      test/get_line.sh
  2. 2
    2
      test/get_table.sh
  3. 1
    1
      test/post_line.sh
  4. 0
    2
      test/set_line.sh

+ 1
- 1
test/get_line.sh View File

@@ -3,7 +3,7 @@
3 3
 help() {
4 4
     echo "Syntaxe"
5 5
     echo "‾‾‾‾‾‾‾"
6
-    echo "sh $0 [ adresse ] [ username ] [ password ]\n"
6
+    echo "sh $0 [ adresse ] [ tablename ] [ id ]\n"
7 7
 }
8 8
 
9 9
 if [ -z "$1" ]

+ 2
- 2
test/get_table.sh View File

@@ -3,7 +3,7 @@
3 3
 help() {
4 4
     echo "Syntaxe"
5 5
     echo "‾‾‾‾‾‾‾"
6
-    echo "sh $0 [ adresse ] [ username ] [ password ]\n"
6
+    echo "sh $0 [ adresse ] [ tablename ]\n"
7 7
 }
8 8
 
9 9
 if [ -z "$1" ]
@@ -18,7 +18,7 @@ then
18 18
     help
19 19
     exit
20 20
 fi
21
-echo "Login as $2 in cookie.txt"
21
+echo "List entries from table $2"
22 22
 echo "$1 $2 $3"
23 23
 curl --header "Content-Type: application/json" -b cookie.txt $1/api.php/records/$2
24 24
 echo "\n"

+ 1
- 1
test/post_line.sh View File

@@ -25,7 +25,7 @@ then
25 25
     exit
26 26
 fi
27 27
 
28
-echo "Get id $3 of table $2"
28
+echo "Post $3 to table $2"
29 29
 echo "$1 $2 $3"
30 30
 curl --header "Content-Type: application/json" -b cookie.txt --data "$3" $1/api.php/records/$2/
31 31
 echo "\n"

+ 0
- 2
test/set_line.sh View File

@@ -33,7 +33,5 @@ then
33 33
 fi
34 34
 
35 35
 echo "Set data for $2 with id $3"
36
-echo "$1 $2 $3 $4"
37
-echo curl --header "Content-Type: application/json" -b cookie.txt --data "$4" $1/api.php/records/$2/$3
38 36
 curl --header "Content-Type: application/json" -b cookie.txt -X PUT --data "$4" $1/api.php/records/$2/$3
39 37
 echo "\n"

Loading…
Cancel
Save