aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorAlex Kozlov <ak@FreeBSD.org>2014-10-08 21:39:47 +0000
committerAlex Kozlov <ak@FreeBSD.org>2014-10-08 21:39:47 +0000
commit6107ede2acbd504ee76b021601bd5308bd3d937d (patch)
tree4d3d5098fd8dcd3548442a6ea294205afbd6bc95 /Keywords
parentfe37bb79589ccb5d6a08d4c151a53862a604e65b (diff)
downloadports-6107ede2acbd504ee76b021601bd5308bd3d937d.tar.gz
ports-6107ede2acbd504ee76b021601bd5308bd3d937d.zip
Notes
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/fc.ucl12
-rw-r--r--Keywords/fcfontsdir.ucl28
-rw-r--r--Keywords/fontsdir.ucl24
-rw-r--r--Keywords/shell.ucl12
4 files changed, 54 insertions, 22 deletions
diff --git a/Keywords/fc.ucl b/Keywords/fc.ucl
index 15158231c40e..e54d0477a819 100644
--- a/Keywords/fc.ucl
+++ b/Keywords/fc.ucl
@@ -4,8 +4,16 @@
actions: [dir]
post-install: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
EOD
diff --git a/Keywords/fcfontsdir.ucl b/Keywords/fcfontsdir.ucl
index 578c88ae9d7e..280dd697b09d 100644
--- a/Keywords/fcfontsdir.ucl
+++ b/Keywords/fcfontsdir.ucl
@@ -4,18 +4,26 @@
actions: [dir]
post-install: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
- mkfontscale %D/%@ 2>/dev/null || true
- mkfontdir %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- fc-cache -s %D/%@ 2>/dev/null || true
- mkfontscale %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.scale -a "`stat -f '%%z' %D/%@/fonts.scale 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.scale
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ fc-cache -s ${fontsdir} 2>/dev/null || true
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
+ rm ${fontsdir}/fonts.scale
fi
- mkfontdir %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.dir -a "`stat -f '%%z' %D/%@/fonts.dir 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.dir
+ mkfontdir ${fontsdir} 2>/dev/null || true
+ if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
+ rm ${fontsdir}/fonts.dir
fi
EOD
diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl
index cd40db4af4c8..d68b4a73999c 100644
--- a/Keywords/fontsdir.ucl
+++ b/Keywords/fontsdir.ucl
@@ -4,16 +4,24 @@
actions: [dir]
post-install: <<EOD
- mkfontscale %D/%@ 2>/dev/null || true
- mkfontdir %D/%@ 2>/dev/null || true
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
- mkfontscale %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.scale -a "`stat -f '%%z' %D/%@/fonts.scale 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.scale
+ case "%@" in
+ /*) fontsdir="%@" ;;
+ *) fontsdir="%D/%@" ;;
+ esac
+ mkfontscale ${fontsdir} 2>/dev/null || true
+ if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
+ rm ${fontsdir}/fonts.scale
fi
- mkfontdir %D/%@ 2>/dev/null || true
- if [ -e %D/%@/fonts.dir -a "`stat -f '%%z' %D/%@/fonts.dir 2>/dev/null`" = '2' ]; then
- rm %D/%@/fonts.dir
+ mkfontdir ${fontsdir} 2>/dev/null || true
+ if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
+ rm ${fontsdir}/fonts.dir
fi
EOD
diff --git a/Keywords/shell.ucl b/Keywords/shell.ucl
index 70a21ad4fd4b..16a094eaca95 100644
--- a/Keywords/shell.ucl
+++ b/Keywords/shell.ucl
@@ -13,12 +13,20 @@
actions: [file]
post-install: <<EOD
+ case "%@" in
+ /*) file="%@" ;;
+ *) file="%D/%@" ;;
+ esac
cp /etc/shells /etc/shells.bak
- (grep -v %D/%@ /etc/shells.bak; echo %D/%@) > /etc/shells
+ (grep -v ${file} /etc/shells.bak; echo ${file}) > /etc/shells
rm -f /etc/shells.bak
EOD
pre-deinstall: <<EOD
+ case "%@" in
+ /*) file="%@" ;;
+ *) file="%D/%@" ;;
+ esac
cp /etc/shells /etc/shells.bak
- grep -v %D/%@ /etc/shells.bak > /etc/shells
+ grep -v ${file} /etc/shells.bak > /etc/shells
rm -f /etc/shells.bak
EOD