Files
gentoo-zh/dev-util/oh-my-pi-bin/files/omp
T
2026-08-13 11:21:49 +08:00

32 lines
524 B
Bash

#!/bin/sh
is_update_command() {
while [ "$#" -gt 0 ]; do
case $1 in
--profile)
[ "$#" -ge 2 ] || return 1
shift 2
;;
--profile=*)
shift
;;
update)
return 0
;;
*)
return 1
;;
esac
done
return 1
}
if is_update_command "$@"; then
printf '%s\n' \
'Self-update is disabled for this Portage-managed installation.' \
'Run emerge --update dev-util/oh-my-pi-bin as root, or contact your system administrator.' >&2
exit 1
fi
exec @EPREFIX@/usr/libexec/oh-my-pi/omp "$@"