diff --git a/buildpkg b/buildpkg index 4832afc..f870c5d 100755 --- a/buildpkg +++ b/buildpkg @@ -614,10 +614,6 @@ main() { checkdirwrite "$WORK_DIR" "$SOURCE_DIR" "$PACKAGE_DIR" "$LOG_DIR" checkdirread "$WORK_DIR" "$SOURCE_DIR" "$PACKAGE_DIR" "$LOG_DIR" - if [ "$INSTALL_PKG" ] || [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then - NO_ORPHAN_CHECK=yes - fi - # check the required field in spkgbuild if [ -z "$name" ]; then msgerr "'name' is empty!" @@ -634,6 +630,15 @@ main() { elif [ "`type -t build`" != "function" ]; then msgerr "'build' function not exist!" exit 1 + elif $(echo "$version" | grep -q '-'); then + msgerr "'version' should not contain '-'." + exit 1 + elif $(echo "$release" | grep -q '-'); then + msgerr "'release' should not contain '-'." + exit 1 + elif [ -z "$description" ]; then + msgerr "'description' cant empty." + exit 1 fi PKGNAME="$name-$version-$release.spkg.txz" diff --git a/functions/message b/functions/message index 75f64d2..e8c9071 100644 --- a/functions/message +++ b/functions/message @@ -33,11 +33,11 @@ msginst() { } msgnew() { - echo -e "[${GREEN}N${CRESET}] $@" + echo -e "[${GREEN}n${CRESET}] $@" } msgupg() { - echo -e "[${GREEN}U${CRESET}] $@" + echo -e "[${GREEN}u${CRESET}] $@" } msgnoinst() { @@ -45,5 +45,5 @@ msgnoinst() { } msgmiss() { - echo -e "[${RED}M${CRESET}] $@" + echo -e "[${RED}m${CRESET}] $@" } diff --git a/scratch b/scratch index 55a8a50..d56f026 100755 --- a/scratch +++ b/scratch @@ -398,11 +398,11 @@ sysup() { NEWPKG=0 for d in ${DEP[@]}; do if [ "$(echo ${PKGOUTDATE[@]} | tr ' ' '\n' | grep -x $d)" = "$d" ]; then - echo -ne "[${GREEN}U${CRESET}] $d " + echo -ne "[${GREEN}u${CRESET}] $d " WILLINSTALL+=($d) UPGPKG=$(( $UPGPKG + 1 )) elif [ ! -e "$INDEX_DIR/$d/.pkginfo" ] && getportpath "$d" >/dev/null; then - echo -ne "[${CYAN}N${CRESET}] $d " + echo -ne "[${CYAN}n${CRESET}] $d " WILLINSTALL+=($d) NEWPKG=$(( $NEWPKG + 1 )) fi @@ -874,11 +874,11 @@ if [ "$mode" = "install" ]; then done echo for pkg in ${WILLINSTALL[@]}; do - echo -ne "[${GREEN}I${CRESET}] $pkg " + echo -ne "[${GREEN}i${CRESET}] $pkg " done if [ ${#MISSINGPKG[@]} -gt 0 ]; then for pkg in ${MISSINGPKG[@]}; do - echo -ne "[${RED}M${CRESET}] $pkg " + echo -ne "[${RED}m${CRESET}] $pkg " done fi echo