~pvigo/+junk/linkat-nova-unitat-14.04

« back to all changes in this revision

Viewing changes to debian/patches/0.4

  • Committer: Pablo Vigo
  • Date: 2017-09-01 10:52:10 UTC
  • Revision ID: pvigo@xtec.cat-20170901105210-ep7wbqrx6cmxxw46
VersionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: <short summary of the patch>
 
2
 TODO: Put a short summary on the line above and replace this paragraph
 
3
 with a longer explanation of this change. Complete the meta-information
 
4
 with other relevant fields (see below for details). To make it easier, the
 
5
 information below has been extracted from the changelog. Adjust it or drop
 
6
 it.
 
7
 .
 
8
 linkat-nova-unitat (14.04-0.4) trusty; urgency=low
 
9
 .
 
10
   * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
 
11
Author: Pablo Vigo <pvigo@xtec.cat>
 
12
 
 
13
---
 
14
The information above should follow the Patch Tagging Guidelines, please
 
15
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
 
16
are templates for supplementary fields that you might want to add:
 
17
 
 
18
Origin: <vendor|upstream|other>, <url of original patch>
 
19
Bug: <url in upstream bugtracker>
 
20
Bug-Debian: http://bugs.debian.org/<bugnumber>
 
21
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
 
22
Forwarded: <no|not-needed|url proving that it has been forwarded>
 
23
Reviewed-By: <name and email of someone who approved the patch>
 
24
Last-Update: <YYYY-MM-DD>
 
25
 
 
26
--- linkat-nova-unitat-14.04.orig/linkat-nova-unitat.sh
 
27
+++ linkat-nova-unitat-14.04/linkat-nova-unitat.sh
 
28
@@ -9,21 +9,26 @@ else
 
29
        exit 2
 
30
 fi
 
31
 
 
32
-res=$(zenity --question --title="Nova unitat de xarxa SAMBA" --text="Aquest programa permet crear noves unitats\nde xarxa SAMBA al servidor de centre Linkat.\n\nVoleu continuar?")
 
33
-if [ "$res" -gt 1 ] ; then
 
34
+zenity --question --title="Nova unitat de xarxa SAMBA" --text="Aquest programa permet crear noves unitats\nde xarxa SAMBA al servidor de centre Linkat.\n\nVoleu continuar?"
 
35
+if [ "$?" -gt 0 ] ; then
 
36
        exit 1
 
37
 fi 
 
38
 
 
39
 export TEMPDIR=$(mktemp -d)
 
40
 
 
41
 zenity --forms --title="Unitats de xarxa" --text="Crear nova unitat"    --add-entry="Nom unitat"    --add-entry="Grup LDAP"
 
42
-if [ "$?" -gt 1 ]; then
 
43
+if [ "$?" -gt 0 ]; then
 
44
        exit 1
 
45
 fi
 
46
 
 
47
 NOVAUNITAT=$(echo $res | awk 'BEGIN { FS="|"; } {print $1; }')
 
48
 NOUGRUP=$(echo $res | awk 'BEGIN { FS="|"; } {print $2; }')
 
49
 
 
50
+if [ "$NOVAUNITAT" == "" ] || [ "$NOUGRUP" == "" ] ; then
 
51
+       zenity --error --text="S'ha d'introduir un nom d'unitat i un nom de grup."
 
52
+       exit 2
 
53
+fi
 
54
+
 
55
 for i in "$NOVAUNITAT" "$NOUGRUP"
 
56
 do
 
57
   echo "$i" | grep -E " "