scripts/mkimg.base.sh: search for apkovl script

search for apkovl script in current dir, in ~/.mkimg and in the dir
where the mkimage script was started from.
This commit is contained in:
Natanael Copa 2016-11-11 14:41:22 -08:00
parent 86da5a1047
commit 48bcd519ae
2 changed files with 14 additions and 3 deletions

5
scripts/mkimage.sh Normal file → Executable file
View File

@ -28,7 +28,10 @@ _hostkeys=""
_simulate="" _simulate=""
_checksum="" _checksum=""
scriptdir="$(dirname $0)"
OUTDIR="$PWD" OUTDIR="$PWD"
RELEASE="${build_date}"
msg() { msg() {
if [ -n "$quiet" ]; then return 0; fi if [ -n "$quiet" ]; then return 0; fi
@ -182,7 +185,7 @@ build_profile() {
} }
# load plugins # load plugins
load_plugins "$(dirname $0)" load_plugins "$scriptdir"
[ -z "$HOME" ] || load_plugins "$HOME/.mkimage" [ -z "$HOME" ] || load_plugins "$HOME/.mkimage"
mkimage_yaml="$(dirname $0)"/mkimage-yaml.sh mkimage_yaml="$(dirname $0)"/mkimage-yaml.sh

12
scripts/mkimg.base.sh Normal file → Executable file
View File

@ -52,9 +52,17 @@ section_apks() {
} }
build_apkovl() { build_apkovl() {
local _host="$1" local _host="$1" _script=
msg "Generating $_host.apkovl.tar.gz" msg "Generating $_host.apkovl.tar.gz"
(local _pwd=$PWD; cd "$DESTDIR"; fakeroot "$_pwd"/"$apkovl" "$_host") for _script in "$PWD"/"$apkovl" $HOME/.mkimage/$apkovl \
$(readlink -f "$scriptdir/$apkovl"); do
if [ -f "$_script" ]; then
break
fi
done
[ -n "$_script" ] || die "could not find $apkovl"
(cd "$DESTDIR"; fakeroot "$_script" "$_host")
} }
section_apkovl() { section_apkovl() {