2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-11 12:06:24 +00:00
Files
xcat-core/xCAT/postscripts/xcatpkgutils-loader.sh
T
2026-08-28 15:51:59 -03:00

25 lines
787 B
Bash
Executable File

#!/bin/sh
# EPL license http://www.eclipse.org/legal/epl-v10.html
xcatpkgutils="$(dirname "$0")/xcatpkgutils.sh"
if [ ! -r "$xcatpkgutils" ]; then
printf 'Error: package utility library is not readable: %s\n' "$xcatpkgutils" >&2
unset xcatpkgutils
return 1
fi
unset XCATPKGUTILS_LOADED
# shellcheck source-path=SCRIPTDIR
# shellcheck source=xcatpkgutils.sh
if ! . "$xcatpkgutils"; then
printf 'Error: package utility library could not be loaded: %s\n' "$xcatpkgutils" >&2
unset XCATPKGUTILS_LOADED xcatpkgutils
return 1
fi
if [ "${XCATPKGUTILS_LOADED:-}" != "1" ]; then
printf 'Error: package utility library did not finish loading: %s\n' "$xcatpkgutils" >&2
unset XCATPKGUTILS_LOADED xcatpkgutils
return 1
fi
unset XCATPKGUTILS_LOADED xcatpkgutils