Project

General

Profile

« Previous | Next » 

Revision 8957

lib/util.sh: extern (): use exec to ensure that the executed command is in fact external, and not a shell builtin or other type of non-function command. this also simplifies the code because any shell function for the command does not need to be unset.

View differences:

lib/util.sh
1 1
#!/bin/bash -e
2 2
set -o errexit # in case caller did not have -e in #! line
3 3

  
4
function extern () { (unset -f "$1"; "$@") || return; }
4
function extern () { (exec "$@") || return; }
5 5

  
6 6
realpath () { readlink -f -- "$1"; }
7 7

  

Also available in: Unified diff