[xorg-x11-font-utils] Remove pushd/popd (#664699, #664701)
Matej Cepl
mcepl at fedoraproject.org
Wed Dec 22 12:18:35 UTC 2010
commit cc451c92a842a4a79822ca56884775ce80327a59
Author: Matěj Cepl <mcepl at redhat.com>
Date: Wed Dec 22 13:16:40 2010 +0100
Remove pushd/popd (#664699, #664701)
xorg-x11-font-utils.spec | 31 +++++++++++++++++--------------
xorg-x11-fonts-update-dirs | 5 +++--
2 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/xorg-x11-font-utils.spec b/xorg-x11-font-utils.spec
index b4db072..eec9ffe 100644
--- a/xorg-x11-font-utils.spec
+++ b/xorg-x11-font-utils.spec
@@ -53,15 +53,17 @@ populated fonts.
%setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4
#patch0 -p0 -b .font-util-mapdir-use-datadir-fix
#patch1 -p0 -b .autoconf-add-with-fontdir-option
-pushd mkfontscale-%{mkfontscale}
+oldpwd=$(pwd)
+cd mkfontscale-%{mkfontscale}
%patch2 -p1 -b .all-encodings
-popd
+cd ${oldpwd}
%build
# Build all apps
{
for app in bdftopcf fonttosfnt mkfontdir mkfontscale font-util ; do
- pushd $app-*
+ oldpwd=$(pwd)
+ cd $app-*
# FIXME: We run autoconf to activate font-util-0.99.1-mapdir-use-datadir-fix.patch
case $app in
font-util)
@@ -71,7 +73,7 @@ popd
# this --with-mapdir should be redundant?
%configure --with-mapdir=%{_datadir}/X11/fonts/util
make
- popd
+ cd ${oldpwd}
done
}
@@ -80,16 +82,17 @@ rm -rf $RPM_BUILD_ROOT
# Install all apps
{
for app in bdftopcf fonttosfnt mkfontdir mkfontscale font-util; do
- pushd $app-*
- make install DESTDIR=$RPM_BUILD_ROOT
- popd
- done
- for i in */README ; do
- [ -s $i ] && cp $i README-$(echo $i | sed 's/-[0-9].*//')
- done
- for i in */COPYING ; do
- grep -q stub $i || cp $i COPYING-$(echo $i | sed 's/-[0-9].*//')
- done
+ oldpwd=$(pwd)
+ cd $app-*
+ make install DESTDIR=$RPM_BUILD_ROOT
+ cd ${oldpwd}
+ done
+ for i in */README ; do
+ [ -s $i ] && cp $i README-$(echo $i | sed 's/-[0-9].*//')
+ done
+ for i in */COPYING ; do
+ grep -q stub $i || cp $i COPYING-$(echo $i | sed 's/-[0-9].*//')
+ done
# bdftruncate is part of font-util
cp font-util-*/COPYING COPYING-bdftruncate
diff --git a/xorg-x11-fonts-update-dirs b/xorg-x11-fonts-update-dirs
index 88c6e66..536bfe8 100755
--- a/xorg-x11-fonts-update-dirs
+++ b/xorg-x11-fonts-update-dirs
@@ -51,9 +51,10 @@ fc-cache $fontdir
if ! [ -z "$encodingsdir" ]; then
[ -d "$encodingsdir" ] || mkdir -p "$encodingsdir"
- pushd "$encodingsdir"
+ oldpwd=$(pwd)
+ cd "$encodingsdir"
mkfontscale -n -e "$encodingsdir" -e "$encodingsdir/large"
- popd
+ cd ${oldpwd}
fi
More information about the fonts-bugs
mailing list