提交 6c754892 authored 作者: Travis Cross's avatar Travis Cross

debian: make utilities work when run from within debian/

上级 6e01f317
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### Author: Travis Cross <tc@traviscross.com> ##### Author: Travis Cross <tc@traviscross.com>
pwd="$(pwd)"
ddir="debian"
[ "${pwd##*/}" = "debian" ] && ddir="."
err () { err () {
echo "$0 error: $1" >&2 echo "$0 error: $1" >&2
exit 1 exit 1
...@@ -17,7 +21,7 @@ xread () { ...@@ -17,7 +21,7 @@ xread () {
} }
create_dbg_pkgs () { create_dbg_pkgs () {
for x in debian/*; do for x in $ddir/*; do
test ! -d $x && continue test ! -d $x && continue
test "$x" = "tmp" -o "$x" = "source" && continue test "$x" = "tmp" -o "$x" = "source" && continue
test ! "$x" = "${x%-dbg}" && continue test ! "$x" = "${x%-dbg}" && continue
...@@ -28,7 +32,7 @@ create_dbg_pkgs () { ...@@ -28,7 +32,7 @@ create_dbg_pkgs () {
} }
list_build_depends () { list_build_depends () {
test -f debian/.stamp-bootstrap || (cd debian && ./bootstrap.sh) test -f $ddir/.stamp-bootstrap || (cd $ddir && ./bootstrap.sh)
local deps="" found=false local deps="" found=false
while xread l; do while xread l; do
if [ "${l%%:*}" = "Build-Depends" ]; then if [ "${l%%:*}" = "Build-Depends" ]; then
...@@ -50,7 +54,7 @@ list_build_depends () { ...@@ -50,7 +54,7 @@ list_build_depends () {
break break
fi fi
fi fi
done < debian/control done < $ddir/control
echo "${deps# }" echo "${deps# }"
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论