Results 1 to 3 of 3

Thread: Patch for user-configured download-cache

  1. #1
    Join Date
    Apr 2008
    Location
    York, UK
    Posts
    134

    Default Patch for user-configured download-cache

    Removes code which overrides and ignores the custom-download cache. The DOWNLOAD_CACHE env_var ability still remains intact with this removal.

    Code:
    diff --git a/phoronix-test-suite b/phoronix-test-suite
    index 2c21163..e73bf4c 100755
    --- a/phoronix-test-suite
    +++ b/phoronix-test-suite
    @@ -32,12 +32,6 @@ fi
     # Location to save results, download cache, results viewer, etc. Must have trailing slash.
     export PTS_USER_DIR=$HOME'/.phoronix-test-suite/'
    
    -# Set DOWNLOAD_CACHE if it's not set already by the user
    -if [ "X$DOWNLOAD_CACHE" = "X" ]
    -then
    -       export DOWNLOAD_CACHE=$PTS_USER_DIR'download-cache/'
    -fi
    -
     # Determine PHP binary location
     if [ -x /usr/bin/php5 ] || [ -x /usr/local/bin/php5 ]
     then

  2. #2
    Join Date
    Aug 2007
    Posts
    6,622

    Default

    Which is a bad coding style as you would use

    [ -z "$VAR" ] && VAR=whatever

    If you want to check if $VAR is unset and set something. The default check would be -n that means that

    [ "$VAR" ] || VAR=whatever

    and

    [ -n "$VAR" ] || VAR=whatever

    would be the same - in that case you check if it is wrong of course.

    The last check could be written as

    [ -x /usr/bin/php5 -o -x /usr/local/bin/php5 ]
    Last edited by Kano; 05-14-2008 at 11:58 AM.

  3. #3

    Default

    Patched in master.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •