[deploy_rm] Now exits with proper exit code on success

This commit is contained in:
ayakael 2018-04-15 21:40:11 -04:00
parent 187a00f32e
commit bba5a8680a
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -20,6 +20,6 @@ deploy_rm() {
## Removes trackids from TARGET
_msg EXEC "Removing ${TRACKID} from ${TARGET}"
rm "${TARGET}/$(print_present_path "${DB_FILE}" ${IMAGEID} ${TRACKID})" >${STDERR} 2>&1
[[ $? -eq 0 ]] && { _msg OK; gawk -i inplace -v trackid=${TRACKID} -v value=null 'BEGIN{FS="\t";OFS="\t"}{if($3==trackid){$4=value}{print $0}}' ${DB_FILE}; return 1; } || { _msg WARN; return 1; }
[[ $? -eq 0 ]] && { _msg OK; gawk -i inplace -v trackid=${TRACKID} -v value=null 'BEGIN{FS="\t";OFS="\t"}{if($3==trackid){$4=value}{print $0}}' ${DB_FILE}; return 0; } || { _msg WARN; return 1; }
}