Subversion Repositories programming

Compare Revisions

Ignore whitespace Rev 112 → Rev 113

/shell_programs/parjoin
1,6 → 1,14
#!/bin/sh
 
lxsplit -j "${@}".001
par2repair "${@}" && rm "${@}".???*
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!'