#!/bin/sh # Wrapper to invoke coreutils multicall via individual libexec symlink # # To use: # - symlink this to /usr/bin/uu_$utility # - it will invoke /usr/libexec/uutils-coreutils/$utility # - that is in turn a symlink to /usr/bin/uutils-coreutils, which is a # multicall binary that behaves like $utility when that is argv[0] CALLED_AS=$(basename "$0") UTILITY=${CALLED_AS#uu_} CMD="/usr/libexec/uutils-coreutils/$UTILITY" if [ -L "$CMD" ]; then # we want the argv to be passed as-is here # shellcheck disable=SC2068 "$CMD" $@ else echo "Error: $CMD not found" >&2 exit 1 fi