Ticket #4949: trac_4949-root-delta4to5.patch

File trac_4949-root-delta4to5.patch, 1.0 KB (added by jhpalmieri, 8 years ago)
  • spkg/bin/sage-spkg

    diff --git a/spkg/bin/sage-spkg b/spkg/bin/sage-spkg
    a b if [ $? -ne 0 ]; then 
    208208fi
    209209
    210210cd "$SAGE_BUILD_DIR"
     211if [ $? -ne 0 ]; then
     212    echo >&2 "Unable to find build directory."
     213    exit 1
     214fi
    211215
    212216if [ $DELETE_TMP -eq 1 ]; then
    213217    echo "Deleting directories from past builds of previous/current versions of $PKG_NAME"
    214     # Make triply sure that we are in the build directory before doing
     218    # Make sure that we are in the build directory before doing
    215219    # a scary "rm -rf".
    216220    cd "$SAGE_BUILD_DIR"
    217     # The previous command should always succeed because we just
    218     # created this directory if it wasn't there already, but just in case...
    219     if [ $? -ne 0 ]; then
    220         echo >&2 "Unable to find build directory."
    221     else
    222         rm -rf "$PKG_BASE-"*
    223     fi
     221    rm -rf "$PKG_BASE-"*
    224222else
    225223    for dir in "$PKG_BASE-"*
    226224    do
    else 
    232230                exit 1
    233231            fi
    234232            rm -rf old/"$dir"
    235             mv -f "$dir" old/
     233            mv "$dir" old/
    236234        fi
    237235    done
    238236fi