Last change
on this file since 11381 was
11381,
checked in by charles, 10 years ago
|
(trunk third-party) #3707 "remove dependency to which" -- committed. fix by geirha.
|
-
Property svn:executable set to
*
|
File size:
824 bytes
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | # $Id: updateminiupnpcstrings.sh,v 1.4 2009/07/29 08:34:01 nanard Exp $ |
---|
3 | |
---|
4 | TEMPLATE_FILE=$1 |
---|
5 | OUTPUT_FILE=$2 |
---|
6 | |
---|
7 | # detecting the OS name and version |
---|
8 | OS_NAME=`uname -s` |
---|
9 | OS_VERSION=`uname -r` |
---|
10 | if [ -f /etc/debian_version ]; then |
---|
11 | OS_NAME=Debian |
---|
12 | OS_VERSION=`cat /etc/debian_version` |
---|
13 | fi |
---|
14 | # use lsb_release (Linux Standard Base) when available |
---|
15 | if os_name=`lsb_release -i -s 2>/dev/null`; then |
---|
16 | OS_NAME=$os_name |
---|
17 | OS_VERSION=`lsb_release -r -s` |
---|
18 | fi |
---|
19 | |
---|
20 | echo "Detected OS [$OS_NAME] version [$OS_VERSION]" |
---|
21 | |
---|
22 | EXPR="s|OS_STRING \".*\"|OS_STRING \"${OS_NAME}/${OS_VERSION}\"|" |
---|
23 | #echo $EXPR |
---|
24 | #echo "Backing up $OUTPUT_FILE to $OUTPUT_FILE.bak." |
---|
25 | #cp $OUTPUT_FILE $OUTPUT_FILE.bak |
---|
26 | test -f ${TEMPLATE_FILE} |
---|
27 | echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $OUTPUT_FILE." |
---|
28 | sed -e "$EXPR" < $TEMPLATE_FILE > $OUTPUT_FILE |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.