[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] First define ARG then source vars - only run dak commands if not deploy



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

2 changed files:

Changes:

  • config/debian/cronscript
    ... ... @@ -47,17 +47,17 @@ shopt -s extglob
    47 47
     export LANG=C.UTF-8
    
    48 48
     export LC_ALL=C.UTF-8
    
    49 49
     
    
    50
    -# import the general variable set. (This will overwrite configdir, but
    
    51
    -# it is expected to have the same value)
    
    52
    -export SCRIPTVARS=${configdir:?Please define configdir to run this script}/vars
    
    53
    -. ${SCRIPTVARS}
    
    54
    -
    
    55 50
     # One arg please
    
    56 51
     declare -lr ARG=${1:-"meh"}
    
    57 52
     
    
    58 53
     # program name is the (lower cased) first argument.
    
    59 54
     PROGRAM="${ARG}"
    
    60 55
     
    
    56
    +# import the general variable set. (This will overwrite configdir, but
    
    57
    +# it is expected to have the same value)
    
    58
    +export SCRIPTVARS=${configdir:?Please define configdir to run this script}/vars
    
    59
    +. ${SCRIPTVARS}
    
    60
    +
    
    61 61
     # set DEBUG if you want to see a little more logs (needs to be used more)
    
    62 62
     DEBUG=${DEBUG:-0}
    
    63 63
     
    

  • config/debian/vars
    ... ... @@ -52,7 +52,9 @@ TIMESTAMP=false
    52 52
     declare -lr POSSIBLEARGS='+(unchecked|dinstall|hourly|daily|weekly|monthly|yearly|mirror|deploy)'
    
    53 53
     declare -r HOSTNAME=$(hostname -s)
    
    54 54
     
    
    55
    -archs=$(dak admin a list | tr '\n' ' ')
    
    55
    +if [[ ${ARG} != deploy ]]; then
    
    56
    +    archs=$(dak admin a list | tr '\n' ' ')
    
    56 57
     
    
    57
    -# Set the database variables
    
    58
    -eval $(dak admin config db-shell)
    58
    +    # Set the database variables
    
    59
    +    eval $(dak admin config db-shell)
    
    60
    +fi


  • Reply to: