xbps-src/shutils/common.sh: check $version, - and _ are now forbidden.
This commit is contained in:
parent
e0f47fed67
commit
ca81f8e7f1
|
@ -289,6 +289,16 @@ setup_pkg() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check if version is valid.
|
||||||
|
case "$version" in
|
||||||
|
*-*) msg_error "version contains invalid character: -\n";;
|
||||||
|
*_*) msg_error "version contains invalid character: _\n";;
|
||||||
|
esac
|
||||||
|
case "$version" in
|
||||||
|
*[0-9]*) : good ;;
|
||||||
|
*) msg_error "version must contain at least one digit.\n";;
|
||||||
|
esac
|
||||||
|
|
||||||
# Check if base-chroot is already installed.
|
# Check if base-chroot is already installed.
|
||||||
if [ -z "$bootstrap" ]; then
|
if [ -z "$bootstrap" ]; then
|
||||||
check_installed_pkg base-chroot-0.1_1
|
check_installed_pkg base-chroot-0.1_1
|
||||||
|
|
Loading…
Reference in New Issue