build: use if-then to avoid non-zero return codes in bin/ packaging code