[Xfce4-commits] <midori:master> makedist.midori: Refactor copying of files into a helper function
Christian Dywan
noreply at xfce.org
Fri Feb 10 23:44:07 CET 2012
Updating branch refs/heads/master
to 6ff166f3ba06c3f7a419b3ed6811c0cffdd90f7d (commit)
from ef1928ad1681d351dcfa46d4562941cf3680fa03 (commit)
commit 6ff166f3ba06c3f7a419b3ed6811c0cffdd90f7d
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Thu Feb 9 01:12:11 2012 +0100
makedist.midori: Refactor copying of files into a helper function
win32/makedist/makedist.midori | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index f3771cb..5e3997b 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -1,6 +1,7 @@
#! /bin/sh
# Copyright (C) 2010-2011 Peter de Ridder <peter at xfce.org>
+# Copyright (C) 2012 Paweł Forysiuk <tuxator at o2.pl>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -73,6 +74,18 @@ dll_recursive ()
rm $temp_file_new $temp_file_old
}
+grab_files ()
+{
+ local dir="$1"
+ pushd $root_dir > /dev/null
+ shift
+ while [ "$1" ]; do
+ find $dir "(" -name "$1" ")" -prune -exec mkdir -p $workdir/{} ";" -exec rmdir --ignore-fail-on-non-empty $workdir/{} ";" -exec cp -r {} $workdir/{} ";"
+ shift
+ done
+ popd > /dev/null
+}
+
echo -n "Creating $ARCHIVE ."
# create destination folder
@@ -99,22 +112,25 @@ popd > /dev/null
echo -n .
# copy etc
-pushd $root_dir > /dev/null
-find etc "(" -name "*midori*" -o -name "gtkrc" ")" -prune -exec mkdir -p $workdir/{} ";" -exec rmdir --ignore-fail-on-non-empty $workdir/{} ";" -exec cp -r {} $workdir/{} ";"
-popd > /dev/null
+grab_files etc midori
+grab_files etc gtkrc
echo -n .
# copy lib
-pushd $root_dir > /dev/null
-find lib "(" -path "lib/midori/*" -o -path "lib/gtk-2.0/*" -o -path "lib/enchant/*" -o -path "lib/engines/*" ")" -a -name "*.dll" -prune -exec mkdir -p $workdir/{} ";" -exec rmdir --ignore-fail-on-non-empty $workdir/{} ";" -exec cp -r {} $workdir/{} ";"
-popd > /dev/null
+grab_files lib midori
+grab_files lib gtk-2.0
+grab_files lib engines
+
+grab_files lib enchant
echo -n .
# copy share
-pushd $root_dir > /dev/null
-find share "(" -name "*midori*" -o -name "icons" -o -name "MS-Windows" -o -name "mime" ")" -prune -exec mkdir -p $workdir/{} ";" -exec rmdir --ignore-fail-on-non-empty $workdir/{} ";" -exec cp -r {} $workdir/{} ";"
+grab_files share midori
+grab_files share icons
+grab_files share MS-Windows
+grab_files share mime
# copy locales for gtk
# so we have translated stock items, file dialogs
More information about the Xfce4-commits
mailing list