rebuild: add --resume-from
parent
13dd28f38a
commit
1a3322fa4a
50
rebuild.sh
50
rebuild.sh
|
@ -1,3 +1,4 @@
|
||||||
|
m64pncp=mupen64plus-noncore-plugins-git
|
||||||
all_pkgs=(
|
all_pkgs=(
|
||||||
# deps
|
# deps
|
||||||
cef-standard
|
cef-standard
|
||||||
|
@ -27,7 +28,7 @@ all_pkgs=(
|
||||||
motsognir
|
motsognir
|
||||||
mupen64plus-git
|
mupen64plus-git
|
||||||
mupen64plus-gui-git
|
mupen64plus-gui-git
|
||||||
mupen64plus-noncore-plugins-git
|
$m64pncp
|
||||||
nicotine-plus-git
|
nicotine-plus-git
|
||||||
obs-linuxbrowser-bin
|
obs-linuxbrowser-bin
|
||||||
obs-studio-git
|
obs-studio-git
|
||||||
|
@ -47,15 +48,15 @@ all_pkgs=(
|
||||||
zdoom
|
zdoom
|
||||||
)
|
)
|
||||||
declare -A options=(
|
declare -A options=(
|
||||||
["cef-standard"]="--asdeps"
|
[cef-standard]="--asdeps"
|
||||||
["cereal"]="--asdeps"
|
[cereal]="--asdeps"
|
||||||
["libsodium-git"]="--asdeps"
|
[libsodium-git]="--asdeps"
|
||||||
["mozc"]="--asdeps"
|
[mozc]="--asdeps"
|
||||||
["vim-runtime-git"]="--asdeps"
|
[vim-runtime-git]="--asdeps"
|
||||||
|
|
||||||
["higan"]="--handle Higan --url https://gitlab.com/higan/higan.git/"
|
[higan]="--handle Higan --url https://gitlab.com/higan/higan.git/"
|
||||||
["mupen64plus-noncore-plugins-git"]="-f --url https://git.greyserv.net/marrub/mupen64plus-noncore-plugins-git.git"
|
[$m64pncp]="-f --url https://git.greyserv.net/marrub/$m64pncp.git"
|
||||||
["ppsspp-git"]="--install-as ppsspp-git"
|
[ppsspp-git]="--install-as ppsspp-git"
|
||||||
)
|
)
|
||||||
pkg_ver() {
|
pkg_ver() {
|
||||||
sed '/^pkgver\=/!d;s/pkgver\=\(.*\)/\1/' PKGBUILD
|
sed '/^pkgver\=/!d;s/pkgver\=\(.*\)/\1/' PKGBUILD
|
||||||
|
@ -102,7 +103,7 @@ build_package() {
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--asdeps|--skipinteg|-f)
|
--asdeps|--skipinteg|-f)
|
||||||
makepkg_args="$makepkg_args $1"
|
makepkg_args+=" $1"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -140,7 +141,7 @@ build_package() {
|
||||||
|
|
||||||
if [[ ! $install_as ]]
|
if [[ ! $install_as ]]
|
||||||
then
|
then
|
||||||
makepkg_args="$makepkg_args -i"
|
makepkg_args+=" -i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
makepkg $makepkg_args
|
makepkg $makepkg_args
|
||||||
|
@ -155,14 +156,35 @@ build_package() {
|
||||||
exit_on_err $?
|
exit_on_err $?
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
resume_from() {
|
||||||
|
local resume
|
||||||
|
|
||||||
|
for pkg in ${all_pkgs[*]}
|
||||||
|
do
|
||||||
|
[[ $pkg = $1 ]] && resume=1
|
||||||
|
[[ $resume ]] && echo $pkg
|
||||||
|
done
|
||||||
|
}
|
||||||
main() {
|
main() {
|
||||||
local pkg
|
local pkg
|
||||||
local pkgs
|
local pkgs
|
||||||
|
|
||||||
if (( $# ))
|
while (( $# ))
|
||||||
|
do
|
||||||
|
case $1 in
|
||||||
|
--resume-from)
|
||||||
|
pkgs+=" $(resume_from $2)"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
pkgs+=" $1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ ! $pkgs ]]
|
||||||
then
|
then
|
||||||
pkgs=$@
|
|
||||||
else
|
|
||||||
pkgs=${all_pkgs[*]}
|
pkgs=${all_pkgs[*]}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue