Announcement

Collapse
No announcement yet.

Patch for user-configured download-cache

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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, 11:58 AM.

    Comment


    • #3
      Patched in master.
      Michael Larabel
      http://www.michaellarabel.com/

      Comment

      Working...
      X