All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Waldecker <thomas.waldecker at gmail.com>
To: powertop@lists.01.org
Subject: [Powertop] [PATCH] csstoh shell-script for cross-compiling
Date: Tue, 05 Feb 2013 09:36:49 +0100	[thread overview]
Message-ID: <1360053409-29101-1-git-send-email-thomas.waldecker@gmail.com> (raw)
In-Reply-To: 20130204115902.70694592@bluebird.jf.intel.com

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

Updated the shellscript with changes made by Igor posted in mailing list
https://lists.01.org/pipermail/powertop/2012-July/000165.html

Signed-off-by: Thomas Waldecker <thomas.waldecker(a)gmail.com>
---
 src/Makefile.am |  3 +--
 src/csstoh.sh   | 21 ++++++++++-----------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index a53d942..398b8a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,6 +46,5 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)
 BUILT_SOURCES = css.h
 CLEANFILES = css.h
 css.h: powertop.css
-	chmod +x ./csstoh.sh
-	./csstoh.sh "$(srcdir)"/powertop.css css.h
+	$(SHELL) ./csstoh.sh powertop.css css.h
 
diff --git a/src/csstoh.sh b/src/csstoh.sh
index 5918d12..9d4100b 100755
--- a/src/csstoh.sh
+++ b/src/csstoh.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # This program file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
@@ -16,8 +16,7 @@
 # Boston, MA 02110-1301 USA
 # or just google for it.
 #
-# Written by Igor Zhbanov<i.zhbanov at samsung.com>
-
+# Written by Igor Zhbanov <i.zhbanov at samsung.com>
 
 if [ $# -lt 2 ]; then
 	echo "Usage: csstoh.sh cssfile header.h"
@@ -29,17 +28,17 @@ if [ ! -r $1 ]; then
 	exit 1
 fi
 
-if ! echo -n>$2; then
+if ! echo -n >$2; then
 	echo "Can't open file $2 for writing."
 	exit 1
 fi
 
-echo "#ifndef __INCLUDE_GUARD_CCS_H">>  $2
-echo "#define __INCLUDE_GUARD_CCS_H">>  $2
-echo>>  $2
-echo "const char css[] = ">>  $2
+echo "#ifndef __INCLUDE_GUARD_CCS_H" >> $2
+echo "#define __INCLUDE_GUARD_CCS_H" >> $2
+echo >> $2
+echo "const char css[] = " >> $2
 
-sed -r 's/^(.*)$/\t\"\1\\n\"/' $1>>  $2
+sed -r 's/^(.*)$/\t\"\1\\n\"/' $1 >> $2
 
-echo ";">>  $2
-echo "#endif">>  $2
+echo ";" >> $2
+echo "#endif" >> $2
-- 
1.8.1


             reply	other threads:[~2013-02-05  8:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05  8:36 Thomas Waldecker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-06  8:05 [Powertop] [PATCH] csstoh shell-script for cross-compiling Igor Zhbanov
2013-02-05 18:06 Kristen Carlson Accardi
2013-02-05  9:50 Igor Zhbanov
2013-02-04 19:59 Kristen Carlson Accardi
2013-02-04 19:52 Kristen Carlson Accardi
2013-02-04 10:42 Sergey Senozhatsky
2013-02-04  9:40 Thomas Waldecker
2013-02-02 15:01 Sergey Senozhatsky
2013-02-02  9:03 Thomas Waldecker
2013-02-02  6:26 Sergey Senozhatsky
2013-02-01 20:37 Thomas Waldecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360053409-29101-1-git-send-email-thomas.waldecker@gmail.com \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.