Compare commits
No commits in common. "7b979b45fe3398ae3610a8a1f5430ca7c631b755" and "dd18ae23de93e343722c06a26141e30052ba3a16" have entirely different histories.
7b979b45fe
...
dd18ae23de
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
SUBDIRS := $(wildcard */.)
|
SUBDIRS := $(wildcard */.)
|
||||||
VERSION = 24.09
|
VERSION = 24.06
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
|
@ -80,7 +80,6 @@ if ! type "grub-mkrescue" > /dev/null; then
|
|||||||
set_indent
|
set_indent
|
||||||
warn "If you want to create UEFI ISO files make sure you install x64 GRUB or grub-efi"
|
warn "If you want to create UEFI ISO files make sure you install x64 GRUB or grub-efi"
|
||||||
warn "If you want to create BIOS ISO files make sure you install x86 GRUB or grub-bios"
|
warn "If you want to create BIOS ISO files make sure you install x86 GRUB or grub-bios"
|
||||||
warn "After installing GRUB, don't forget to install libisoburn as well"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -200,7 +199,7 @@ rm "${tmpdir}/stager.sh"
|
|||||||
|
|
||||||
info "Cleaning up and building initrd"
|
info "Cleaning up and building initrd"
|
||||||
rm "${isoh}"
|
rm "${isoh}"
|
||||||
pushd "${tmpdir}" > /dev/null
|
pushd "$TMPDIR" > /dev/null
|
||||||
mkdir -p "${rootdir}/boot"
|
mkdir -p "${rootdir}/boot"
|
||||||
find . | cpio --quiet -H newc -o | xz -T0 --check=crc32 > "${rootdir}/boot/initrd.img"
|
find . | cpio --quiet -H newc -o | xz -T0 --check=crc32 > "${rootdir}/boot/initrd.img"
|
||||||
check_ret "Failed to build initrd"
|
check_ret "Failed to build initrd"
|
||||||
|
@ -42,11 +42,7 @@ get_fn_url() {
|
|||||||
get_file() {
|
get_file() {
|
||||||
if [[ "${1}" == "https://"* || "${1}" == "http://"* || "${1}" == "ftp://"* ]]
|
if [[ "${1}" == "https://"* || "${1}" == "http://"* || "${1}" == "ftp://"* ]]
|
||||||
then
|
then
|
||||||
if [ $OPT_INSECURE -eq 1 ]; then
|
curl "${1}" --progress-bar -OL
|
||||||
curl "${1}" --insecure --progress-bar -OL
|
|
||||||
else
|
|
||||||
curl "${1}" --progress-bar -OL
|
|
||||||
fi
|
|
||||||
return $?
|
return $?
|
||||||
elif [ -f "${pkgpath}/${1}" ]; then
|
elif [ -f "${pkgpath}/${1}" ]; then
|
||||||
cp "${pkgpath}/${1}" .
|
cp "${pkgpath}/${1}" .
|
||||||
@ -93,7 +89,6 @@ help_cmd() {
|
|||||||
echo_color " $BOLD--no-depend$RESET: don't check depends"
|
echo_color " $BOLD--no-depend$RESET: don't check depends"
|
||||||
echo_color " $BOLD--no-stdout$RESET: disable stdout for PACKAGE() function"
|
echo_color " $BOLD--no-stdout$RESET: disable stdout for PACKAGE() function"
|
||||||
echo_color " $BOLD--no-cache$RESET: don't check cache"
|
echo_color " $BOLD--no-cache$RESET: don't check cache"
|
||||||
echo_color " $BOLD--insecure$RESET: allow insecure curl downloads"
|
|
||||||
echo_color " $BOLD--no-opts$RESET: don't show/list options"
|
echo_color " $BOLD--no-opts$RESET: don't show/list options"
|
||||||
echo_color " $BOLD--cores$RESET: how many cores to use for the build"
|
echo_color " $BOLD--cores$RESET: how many cores to use for the build"
|
||||||
echo_color " $BOLD--out$RESET: directory for the output archive"
|
echo_color " $BOLD--out$RESET: directory for the output archive"
|
||||||
@ -159,7 +154,6 @@ check_depends() {
|
|||||||
OPT_NO_DEPEND=0 # checking depends is ENABLED
|
OPT_NO_DEPEND=0 # checking depends is ENABLED
|
||||||
OPT_NO_STDOUT=0 # PACKAGE() function output is ENABLED
|
OPT_NO_STDOUT=0 # PACKAGE() function output is ENABLED
|
||||||
OPT_NO_CACHE=0 # cache is ENABLED
|
OPT_NO_CACHE=0 # cache is ENABLED
|
||||||
OPT_INSECURE=0 # insecure curl downloads are DISABLED
|
|
||||||
OPT_NO_OPTS=0 # showing/listing options is ENABLED
|
OPT_NO_OPTS=0 # showing/listing options is ENABLED
|
||||||
OPT_CORES=$(nproc) # use ALL CPU cores
|
OPT_CORES=$(nproc) # use ALL CPU cores
|
||||||
OPT_OUT="DEFAULT" # use the package dist directory for output
|
OPT_OUT="DEFAULT" # use the package dist directory for output
|
||||||
@ -177,8 +171,6 @@ for arg in "$@"; do
|
|||||||
OPT_NO_STDOUT=1 ;;
|
OPT_NO_STDOUT=1 ;;
|
||||||
"--no-cache")
|
"--no-cache")
|
||||||
OPT_NO_CACHE=1 ;;
|
OPT_NO_CACHE=1 ;;
|
||||||
"--insecure")
|
|
||||||
OPT_INSECURE=1 ;;
|
|
||||||
"--no-opts")
|
"--no-opts")
|
||||||
OPT_NO_OPTS=1 ;;
|
OPT_NO_OPTS=1 ;;
|
||||||
"--cores"*)
|
"--cores"*)
|
||||||
@ -231,7 +223,6 @@ if [ $OPT_NO_OPTS -eq 0 ]; then
|
|||||||
print " $BOLD NO_DEPEND = $(itoyn $OPT_NO_DEPEND)"
|
print " $BOLD NO_DEPEND = $(itoyn $OPT_NO_DEPEND)"
|
||||||
print " $BOLD NO_SDTOUT = $(itoyn $OPT_NO_STDOUT)"
|
print " $BOLD NO_SDTOUT = $(itoyn $OPT_NO_STDOUT)"
|
||||||
print " $BOLD NO_CACHE = $(itoyn $OPT_NO_CACHE)"
|
print " $BOLD NO_CACHE = $(itoyn $OPT_NO_CACHE)"
|
||||||
print " $BOLD INSECURE = $(itoyn $OPT_INSECURE)"
|
|
||||||
print " $BOLD NO_OPTS = $(itoyn $OPT_NO_OPTS)"
|
print " $BOLD NO_OPTS = $(itoyn $OPT_NO_OPTS)"
|
||||||
print " $BOLD CORES = ${OPT_CORES}"
|
print " $BOLD CORES = ${OPT_CORES}"
|
||||||
print " $BOLD OUT = ${OPT_OUT}"
|
print " $BOLD OUT = ${OPT_OUT}"
|
||||||
@ -377,8 +368,6 @@ info "Running the build function"
|
|||||||
export CC="gcc"
|
export CC="gcc"
|
||||||
export CXX="g++"
|
export CXX="g++"
|
||||||
export CFLAGS="-march=x86-64 -mtune=generic -O2"
|
export CFLAGS="-march=x86-64 -mtune=generic -O2"
|
||||||
export CPPFLAGS="-march=x86-64 -mtune=generic -O2"
|
|
||||||
export CXXFLAGS="-march=x86-64 -mtune=generic -O2"
|
|
||||||
export ROOTDIR="${rootpath}"
|
export ROOTDIR="${rootpath}"
|
||||||
export MAKEFLAGS="-j${OPT_CORES}"
|
export MAKEFLAGS="-j${OPT_CORES}"
|
||||||
export MAKEOPTS="-j${OPT_CORES}"
|
export MAKEOPTS="-j${OPT_CORES}"
|
||||||
@ -398,7 +387,6 @@ fi
|
|||||||
|
|
||||||
unset XORG_CONFIG XORG_PREFIX
|
unset XORG_CONFIG XORG_PREFIX
|
||||||
unset MAKEOPTS MAKEFLAGS CXX
|
unset MAKEOPTS MAKEFLAGS CXX
|
||||||
unset CPPFLAGS CXXFLAGS
|
|
||||||
unset CFLAGS ROOTDIR CC
|
unset CFLAGS ROOTDIR CC
|
||||||
|
|
||||||
if [ "$SECONDS" != "0" ]; then
|
if [ "$SECONDS" != "0" ]; then
|
||||||
@ -421,11 +409,6 @@ mkdir -p "${distpath}"
|
|||||||
clean_dist
|
clean_dist
|
||||||
|
|
||||||
# build the files archive
|
# build the files archive
|
||||||
if [ -z "$(ls -A)" ]; then
|
|
||||||
error "Root directory is empty, did something went wrong during build?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
find . -printf "%P\n" | fakeroot tar -czf "${distpath}/files.tar.gz" --no-recursion -T -
|
find . -printf "%P\n" | fakeroot tar -czf "${distpath}/files.tar.gz" --no-recursion -T -
|
||||||
check_ret "(1/6) Failed to create the files archive (files.tar.gz)"
|
check_ret "(1/6) Failed to create the files archive (files.tar.gz)"
|
||||||
success "(1/6) Created the files archive (files.tar.gz)"
|
success "(1/6) Created the files archive (files.tar.gz)"
|
||||||
@ -455,7 +438,7 @@ success "(3/6) Created the changes file (CHANGES)"
|
|||||||
|
|
||||||
# create the install script
|
# create the install script
|
||||||
if type INSTALL &>/dev/null; then
|
if type INSTALL &>/dev/null; then
|
||||||
echo "$(type INSTALL | head -n-1 | sed '1,3d' | sed 's/ //')" > "${distpath}/INSTALL"
|
echo "$(type INSTALL | head -n-1 | tail -n-2 | sed 's/ //')" > "${distpath}/INSTALL"
|
||||||
check_ret "(4/6) Failed to create the install script (INSTALL)"
|
check_ret "(4/6) Failed to create the install script (INSTALL)"
|
||||||
fi
|
fi
|
||||||
success "(4/6) Created the install script (INSTALL)"
|
success "(4/6) Created the install script (INSTALL)"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check
|
install -Dm755 "mp-check.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm $(DESTDIR)/$(PREFIX)/bin/mp-check
|
rm $(DESTDIR)/$(PREFIX)/bin/mp-check
|
||||||
|
@ -34,7 +34,7 @@ fi
|
|||||||
## global vars ##
|
## global vars ##
|
||||||
#################
|
#################
|
||||||
warnc=0
|
warnc=0
|
||||||
tmpdir="/tmp/.mp-check"
|
tmpdir="/tmp/.mp-clean"
|
||||||
required_files=(
|
required_files=(
|
||||||
"DATA"
|
"DATA"
|
||||||
"HASHES"
|
"HASHES"
|
||||||
@ -54,7 +54,6 @@ root_dirs=(
|
|||||||
"usr"
|
"usr"
|
||||||
"var"
|
"var"
|
||||||
"opt"
|
"opt"
|
||||||
"run"
|
|
||||||
)
|
)
|
||||||
bad_vars=(
|
bad_vars=(
|
||||||
'$VERSION'
|
'$VERSION'
|
||||||
@ -174,26 +173,6 @@ check_archive(){
|
|||||||
fail_check
|
fail_check
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${k}" == "size" ]; then
|
|
||||||
if [ ! -z "${line_1}" ]; then
|
|
||||||
size="$(echo "${line_1}" | sed 's/size= //g')"
|
|
||||||
size="$(echo "${size}" | sed 's/size=//g')"
|
|
||||||
else
|
|
||||||
size="$(echo "${line_2}" | sed 's/size = //g')"
|
|
||||||
size="$(echo "${size}" | sed 's/size =//g')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${size}" ]; then
|
|
||||||
error "Failed to obtain package size information"
|
|
||||||
fail_check
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${size}" == "0" ]; then
|
|
||||||
error "Package size information is set as 0, is the package empty?"
|
|
||||||
fail_check
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
name="$(head -n1 "${tmpdir}/DATA" | sed 's/\[//g')"
|
name="$(head -n1 "${tmpdir}/DATA" | sed 's/\[//g')"
|
||||||
@ -204,24 +183,6 @@ check_archive(){
|
|||||||
fail_check
|
fail_check
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${name}" in
|
|
||||||
*_*)
|
|
||||||
error "Package name contains an invalid character: \"_\""
|
|
||||||
fail_check ;;
|
|
||||||
*" "*)
|
|
||||||
error "Package name contains an invalid character: \" \""
|
|
||||||
fail_check ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "${version}" in
|
|
||||||
*_*)
|
|
||||||
error "Package version contains an invalid character: \"_\""
|
|
||||||
fail_check ;;
|
|
||||||
*" "*)
|
|
||||||
error "Package version contains an invalid character: \" \""
|
|
||||||
fail_check ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
filename="${name}_${version}.mpf"
|
filename="${name}_${version}.mpf"
|
||||||
|
|
||||||
info "Checking HASHES file"
|
info "Checking HASHES file"
|
||||||
@ -246,15 +207,8 @@ check_archive(){
|
|||||||
done < "${tmpdir}/HASHES"
|
done < "${tmpdir}/HASHES"
|
||||||
|
|
||||||
info "Checking files.tar.gz archive"
|
info "Checking files.tar.gz archive"
|
||||||
filec=0
|
|
||||||
|
|
||||||
while read p; do
|
while read p; do
|
||||||
if [ -z "${p}" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
filec=$((filec + 1))
|
|
||||||
|
|
||||||
if [ "${p:0:1}" == "." ] || [ "${p:0:1}" == "/" ]; then
|
if [ "${p:0:1}" == "." ] || [ "${p:0:1}" == "/" ]; then
|
||||||
error "Root file location is invalid (${p:0:1})"
|
error "Root file location is invalid (${p:0:1})"
|
||||||
fail_check
|
fail_check
|
||||||
@ -276,11 +230,6 @@ check_archive(){
|
|||||||
fi
|
fi
|
||||||
done < <(tar tf "${tmpdir}/files.tar.gz")
|
done < <(tar tf "${tmpdir}/files.tar.gz")
|
||||||
|
|
||||||
if [ "${filec}" == "0" ]; then
|
|
||||||
error "Package file archive is empty (no files)"
|
|
||||||
fail_check
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Checking INSTALL file"
|
info "Checking INSTALL file"
|
||||||
|
|
||||||
if [ -f "${tmpdir}/INSTALL" ] && ! grep -q . "${tmpdir}/INSTALL"; then
|
if [ -f "${tmpdir}/INSTALL" ] && ! grep -q . "${tmpdir}/INSTALL"; then
|
||||||
@ -293,10 +242,6 @@ check_archive(){
|
|||||||
add_warning "Changes file is empty"
|
add_warning "Changes file is empty"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep "${version}" "${tmpdir}/CHANGES" &> /dev/null; then
|
|
||||||
add_warning "Changes potentially does not have an entry for the current version"
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Checking archive name"
|
info "Checking archive name"
|
||||||
|
|
||||||
archivefile="$(basename "${archivepath}")"
|
archivefile="$(basename "${archivepath}")"
|
||||||
@ -367,12 +312,6 @@ check_source(){
|
|||||||
if ! grep -q . "${sourcepath}/changes.md"; then
|
if ! grep -q . "${sourcepath}/changes.md"; then
|
||||||
add_warning "Changes file is empty"
|
add_warning "Changes file is empty"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep "${VERSION}" "${sourcepath}/changes.md" &> /dev/null; then
|
|
||||||
add_warning "Changes potentially does not have an entry for the current version"
|
|
||||||
fi
|
|
||||||
|
|
||||||
clean_pkg_vars
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#################
|
#################
|
@ -78,24 +78,17 @@ fi
|
|||||||
# source and store every package
|
# source and store every package
|
||||||
files=("INFO" "LIST")
|
files=("INFO" "LIST")
|
||||||
pc="$(ls -1q "${srcpath}" | wc -l)"
|
pc="$(ls -1q "${srcpath}" | wc -l)"
|
||||||
pi=0
|
pi=1
|
||||||
|
|
||||||
info "Sourcing all the packages"
|
info "Sourcing all the packages"
|
||||||
set_indent
|
set_indent
|
||||||
|
|
||||||
for pkg in "${srcpath}/"*; do
|
for pkg in "${srcpath}/"*; do
|
||||||
pkg_name=$(basename "${pkg}")
|
package=$(basename "${pkg}")
|
||||||
pi=$((pi+1))
|
info "(${pi}/${pc}) Sourcing \"${package}\""
|
||||||
|
|
||||||
if should_ignore "${pkg_name}"; then
|
|
||||||
info "(${pi}/${pc}) Ignoring \"${pkg_name}\""
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "(${pi}/${pc}) Sourcing \"${pkg_name}\""
|
|
||||||
|
|
||||||
source "${pkg}/pkg.sh"
|
source "${pkg}/pkg.sh"
|
||||||
check_ret "(${pi}/${pc}) Failed to import the source script for \"${pkg_name}\""
|
check_ret "(${pi}/${pc}) Failed to import the source script for \"${package}\""
|
||||||
|
|
||||||
check_pkg_vars
|
check_pkg_vars
|
||||||
check_ret
|
check_ret
|
||||||
@ -104,6 +97,7 @@ for pkg in "${srcpath}/"*; do
|
|||||||
files+=("${NAME}_${VERSION}.mpf.sig")
|
files+=("${NAME}_${VERSION}.mpf.sig")
|
||||||
|
|
||||||
clean_pkg_vars
|
clean_pkg_vars
|
||||||
|
pi=$((pi+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
success "Completed"
|
success "Completed"
|
||||||
|
@ -42,7 +42,6 @@ help_cmd() {
|
|||||||
echo_color " $BOLD--no-depend$RESET: don't check depends"
|
echo_color " $BOLD--no-depend$RESET: don't check depends"
|
||||||
echo_color " $BOLD--no-stdout$RESET: disable stdout for build() function"
|
echo_color " $BOLD--no-stdout$RESET: disable stdout for build() function"
|
||||||
echo_color " $BOLD--no-cache$RESET: don't use cache"
|
echo_color " $BOLD--no-cache$RESET: don't use cache"
|
||||||
echo_color " $BOLD--insecure$RESET: allow insecure curl downloads"
|
|
||||||
echo_color " $BOLD--no-opts$RESET: don't show/list options"
|
echo_color " $BOLD--no-opts$RESET: don't show/list options"
|
||||||
echo_color " $BOLD--no-sign$RESET: don't sign build packages"
|
echo_color " $BOLD--no-sign$RESET: don't sign build packages"
|
||||||
echo_color " $BOLD--cores$RESET: how many cores to use for the build"
|
echo_color " $BOLD--cores$RESET: how many cores to use for the build"
|
||||||
@ -75,10 +74,17 @@ list_to_str(){
|
|||||||
mp_build_opts(){
|
mp_build_opts(){
|
||||||
local opts=("${1}" "--no-opts" "--out='${2}'")
|
local opts=("${1}" "--no-opts" "--out='${2}'")
|
||||||
|
|
||||||
[ $OPT_NO_DEPEND -eq 1 ] && opts+=("--no-depend")
|
if [ $OPT_NO_DEPEND -eq 1 ]; then
|
||||||
[ $OPT_NO_STDOUT -eq 1 ] && opts+=("--no-stdout")
|
opts+=("--no-depend")
|
||||||
[ $OPT_INSECURE -eq 1 ] && opts+=("--insecure")
|
fi
|
||||||
[ $OPT_NO_CACHE -eq 1 ] && opts+=("--no-cache")
|
|
||||||
|
if [ $OPT_NO_STDOUT -eq 1 ]; then
|
||||||
|
opts+=("--no-stdout")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $OPT_NO_CACHE -eq 1 ]; then
|
||||||
|
opts+=("--no-cache")
|
||||||
|
fi
|
||||||
|
|
||||||
mp-build ${opts[@]}
|
mp-build ${opts[@]}
|
||||||
return "$?"
|
return "$?"
|
||||||
@ -91,7 +97,6 @@ OPT_SKIP_FAIL=0 # stop build when a package build fails
|
|||||||
OPT_NO_DEPEND=0 # checking depends is ENABLED
|
OPT_NO_DEPEND=0 # checking depends is ENABLED
|
||||||
OPT_NO_STDOUT=0 # build() function output is ENABLED
|
OPT_NO_STDOUT=0 # build() function output is ENABLED
|
||||||
OPT_NO_CACHE=0 # cache is ENABLED
|
OPT_NO_CACHE=0 # cache is ENABLED
|
||||||
OPT_INSECURE=0 # insecure curl downloads are DISABLED
|
|
||||||
OPT_NO_OPTS=0 # showing/listing options is ENABLED
|
OPT_NO_OPTS=0 # showing/listing options is ENABLED
|
||||||
OPT_NO_SIGN=0 # sign all the built packages
|
OPT_NO_SIGN=0 # sign all the built packages
|
||||||
OPT_CORES=$(nproc) # use ALL CPU cores
|
OPT_CORES=$(nproc) # use ALL CPU cores
|
||||||
@ -113,8 +118,6 @@ for arg in "$@"; do
|
|||||||
OPT_NO_STDOUT=1 ;;
|
OPT_NO_STDOUT=1 ;;
|
||||||
"--no-cache")
|
"--no-cache")
|
||||||
OPT_NO_CACHE=1 ;;
|
OPT_NO_CACHE=1 ;;
|
||||||
"--insecure")
|
|
||||||
OPT_INSECURE=1 ;;
|
|
||||||
"--no-opts")
|
"--no-opts")
|
||||||
OPT_NO_OPTS=1 ;;
|
OPT_NO_OPTS=1 ;;
|
||||||
"--no-sign")
|
"--no-sign")
|
||||||
@ -159,7 +162,6 @@ if [ $OPT_NO_OPTS -eq 0 ]; then
|
|||||||
print " $BOLD NO_DEPEND = $(itoyn $OPT_NO_DEPEND)"
|
print " $BOLD NO_DEPEND = $(itoyn $OPT_NO_DEPEND)"
|
||||||
print " $BOLD NO_SDTOUT = $(itoyn $OPT_NO_STDOUT)"
|
print " $BOLD NO_SDTOUT = $(itoyn $OPT_NO_STDOUT)"
|
||||||
print " $BOLD NO_CACHE = $(itoyn $OPT_NO_CACHE)"
|
print " $BOLD NO_CACHE = $(itoyn $OPT_NO_CACHE)"
|
||||||
print " $BOLD INSECURE = $(itoyn $OPT_INSECURE)"
|
|
||||||
print " $BOLD NO_OPTS = $(itoyn $OPT_NO_OPTS)"
|
print " $BOLD NO_OPTS = $(itoyn $OPT_NO_OPTS)"
|
||||||
print " $BOLD NO_SIGN = $(itoyn $OPT_NO_SIGN)"
|
print " $BOLD NO_SIGN = $(itoyn $OPT_NO_SIGN)"
|
||||||
print " $BOLD CORES = $OPT_CORES"
|
print " $BOLD CORES = $OPT_CORES"
|
||||||
@ -203,22 +205,16 @@ fi
|
|||||||
|
|
||||||
# build every package
|
# build every package
|
||||||
pc=${#OPT_PACKAGES[@]}
|
pc=${#OPT_PACKAGES[@]}
|
||||||
pi=0
|
pi=1
|
||||||
|
|
||||||
for pkg_name in "${OPT_PACKAGES[@]}"; do
|
for pkg_name in "${OPT_PACKAGES[@]}"; do
|
||||||
pkg="${srcpath}/${pkg_name}"
|
pkg="${srcpath}/${pkg_name}"
|
||||||
pi=$((pi+1))
|
|
||||||
|
|
||||||
if [ ! -d "${pkg}" ]; then
|
if [ ! -d "${pkg}" ]; then
|
||||||
error "Package not found: \"${pkg_name}\""
|
error "Package not found: \"${pkg_name}\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if should_ignore "${pkg_name}"; then
|
|
||||||
info "(${pi}/${pc}) Ignoring \"${pkg_name}\""
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "(${pi}/${pc}) Building \"${pkg_name}\""
|
info "(${pi}/${pc}) Building \"${pkg_name}\""
|
||||||
|
|
||||||
if [ $OPT_SKIP_FAIL -eq 1 ]; then
|
if [ $OPT_SKIP_FAIL -eq 1 ]; then
|
||||||
@ -243,6 +239,7 @@ for pkg_name in "${OPT_PACKAGES[@]}"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
success "(${pi}/${pc}) Build was successful for \"${pkg_name}\""
|
success "(${pi}/${pc}) Build was successful for \"${pkg_name}\""
|
||||||
|
pi=$((pi+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
success "Completed all the package builds"
|
success "Completed all the package builds"
|
||||||
|
@ -228,24 +228,5 @@ check_pkg_vars() {
|
|||||||
return 1 ;;
|
return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${VERSION}" in
|
|
||||||
*_*)
|
|
||||||
error "Package version contains an invalid character: \"_\""
|
|
||||||
unset_indent
|
|
||||||
return 1 ;;
|
|
||||||
*" "*)
|
|
||||||
error "Package version contains an invalid character: \" \""
|
|
||||||
unset_indent
|
|
||||||
return 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if a package should be ignored
|
|
||||||
should_ignore(){
|
|
||||||
for i in "${IGNORE[@]}"; do
|
|
||||||
[ "${i}" == "${1}" ] && return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user