mkblog.sh 980 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # This program is free software: you can redistribute it and/or modify
  3. # it under the terms of the GNU Affero General Public License as
  4. # published by the Free Software Foundation, either version 3 of the
  5. # License, or (at your option) any later version.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU Affero General Public License for more details.
  10. # You should have received a copy of the GNU Affero General Public License
  11. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. if [ -z "${VISUAL}" ] && [ -z "${EDITOR}" ]; then
  13. env -i HOME="${HOME}" TERM="${TERM}" EDITOR="vi" ./.mkblog.sh "$@"
  14. elif [ -z "${EDITOR}" ]; then
  15. env -i HOME="${HOME}" TERM="${TERM}" EDITOR="${VISUAL}" ./.mkblog.sh "$@"
  16. else
  17. env -i HOME="${HOME}" TERM="${TERM}" EDITOR="${EDITOR}" ./.mkblog.sh "$@"
  18. fi