Subversion Repositories programming

Rev

Rev 98 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/sh

lxsplit -j "${@}".001                   ### Attempt to join the file
par2repair "${@}".*???2                 ### Attempt to repair the joined file

RETURN_CODE=$?                          ### Get the return code of the repair

if [ ${RETURN_CODE} -eq 0 ]; then       ### If the repair was successful
    rm "${@}".???*                      ### then remove all the source files
else                                    ### If the repair was not successful
    rm "${@}"                           ### then remove the attempted file
fi

echo 'Done, Exiting!'