diff options
author | root | 2006-06-15 20:53:50 -0500 |
---|---|---|
committer | root | 2006-06-15 20:53:50 -0500 |
commit | 05e7812a123fc07fbd6484002a6a677f4a8ac27c (patch) | |
tree | 144c56e16c179e9b95e4dfcb9c11306579b63248 /libcompat | |
parent | 51c5ef5153e4c209169847a5a1ee8a62bcd7e30c (diff) |
libcompat: 2006/06/15 sync from p4
Diffstat (limited to 'libcompat')
-rwxr-xr-x | libcompat | 37 |
1 files changed, 35 insertions, 2 deletions
@@ -1,7 +1,19 @@ # ignore sub_depends if not supported by sorcery declare -f sub_depends &> /dev/null || -function sub_depends() { - : +{ + function sub_depends() { + : + } + + function depends() { + [[ $1 == "-sub" ]] && shift 2 + real_depends "$@" + } + + function optional_depends() { + [[ $1 == "-sub" ]] && shift 2 + real_optional_depends "$@" + } } # ignore force_depends if not supported by sorcery @@ -9,3 +21,24 @@ declare -f force_depends &> /dev/null || function force_depends() { : } + +#------------------------------------------------------------------------- +## Grimoire gaze depends alternative +## Uses gaze depends if the internal sorcery function isn't available +#------------------------------------------------------------------------- +declare -f fast_up_depends &> /dev/null || +function fast_up_depends() { + gaze -q depends --fast "$@" +} + +# fall back to optional_depends if suggest_depends isn't implemented +declare -f suggest_depends &> /dev/null || +function suggest_depends() { + optional_depends "$@" +} + +# fall back to depends if runtime_depends isn't implemented +declare -f runtime_depends &> /dev/null || +function runtime_depends() { + depends "$@" +} |