postinst 252 B

1234567891011
  1. #!/bin/sh
  2. BINARY="/usr/bin/ion"
  3. if ! grep ion /etc/shells >/dev/null; then
  4. echo ${BINARY} >> /etc/shells
  5. else
  6. shell=$(grep ion /etc/shells)
  7. if [ "$shell" != "${BINARY}" ]; then
  8. sed -i -e "s#$shell#${BINARY}#g" /etc/shells
  9. fi
  10. fi