Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: debian.chrome/scripts/link-headers

Issue 646032: Rename config to match naming convention. (Closed)
Patch Set: Send mail Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « debian.chrome/scripts/control-create ('k') | debian.chrome/scripts/misc/getabis » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debian.chrome/scripts/link-headers
diff --git a/debian.chrome/scripts/link-headers b/debian.chrome/scripts/link-headers
new file mode 100755
index 0000000000000000000000000000000000000000..fb42dbd12e4df240b861f060d5c72c2b2edc9cee
--- /dev/null
+++ b/debian.chrome/scripts/link-headers
@@ -0,0 +1,42 @@
+#!/bin/bash -e
+
+. debian/debian.env
+
+hdrdir="$1"
+symdir="$2"
+flavour="$3"
+
+echo "Symlinking and copying headers for $flavour..."
+
+excludes="( -path ./debian -prune -o -path ./${DEBIAN} -prune -o -path ./.git ) -prune -o"
+
+(
+find . $excludes -type f \
+ \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
+ -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) -print
+find ./include ./scripts -name .gitignore -prune -o -type f -print
+find ./include -mindepth 1 -maxdepth 1 $excludes -type d -print
+) | (
+while read file; do
+ dir=$file
+ lastdir=$file
+
+ if [ -e "$hdrdir/$file" -o -L "$hdrdir/$file" ]; then
+ continue
+ fi
+
+ while [ ! -e "$hdrdir/$dir" -a ! -L "$hdrdir/$dir" ]; do
+ lastdir=$dir
+ dir=`dirname $dir`
+ done
+ # If the last item to exist is a symlink we assume all is good
+ if [ ! -L "$hdrdir/$dir" ]; then
+ # Turns things like "./foo" into "../"
+ deref="`echo -n $lastdir | sed -e 's/^\.//' -e's,/[^/]*,../,g'`"
+ item="`echo -n $lastdir | sed -e 's/^\.\///'`"
+ ln -s $deref$symdir/$item $hdrdir/$item
+ fi
+done
+)
+
+exit
« no previous file with comments | « debian.chrome/scripts/control-create ('k') | debian.chrome/scripts/misc/getabis » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698