Commit 2d74d1f8 authored by Claes Sjofors's avatar Claes Sjofors

pwr_projectlist delimiter changed from \b to \s

parent 11458188
...@@ -19,7 +19,7 @@ pwra_set_func() ...@@ -19,7 +19,7 @@ pwra_set_func()
# Command is "set base" # Command is "set base"
basename=$2 basename=$2
basename=${basename//\./\\.} basename=${basename//\./\\.}
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "^"%base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -67,7 +67,7 @@ pwra_set_func() ...@@ -67,7 +67,7 @@ pwra_set_func()
return return
fi fi
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "^"%base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
......
...@@ -19,7 +19,7 @@ pwra_set_func() ...@@ -19,7 +19,7 @@ pwra_set_func()
# Command is "set base" # Command is "set base"
basename=$2 basename=$2
basename=${basename//\./\\.} basename=${basename//\./\\.}
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -67,7 +67,7 @@ pwra_set_func() ...@@ -67,7 +67,7 @@ pwra_set_func()
return return
fi fi
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -117,6 +117,7 @@ EOF ...@@ -117,6 +117,7 @@ EOF
pwra_parse () pwra_parse ()
{ {
unamestr=`eval uname` unamestr=`eval uname`
onamestr=`eval uname -o`
machine=`eval uname -m` machine=`eval uname -m`
if [ $unamestr == "Darwin" ]; then if [ $unamestr == "Darwin" ]; then
os="os_macos" os="os_macos"
...@@ -124,8 +125,18 @@ pwra_parse () ...@@ -124,8 +125,18 @@ pwra_parse ()
elif [ $unamestr == "FreeBSD" ]; then elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd" os="os_freebsd"
hw="hw_x86_64" hw="hw_x86_64"
elif [ $unamestr == "OpenBSD" ]; then
os="os_openbsd"
hw="hw_x86_64"
elif [ $onamestr == "Cygwin" ]; then
os="os_cygwin"
hw="hw_x86"
else else
if [ $machine != "x86_64" ]; then if [ $machine == "x86_64" ]; then
machine="x86_64"
elif [ ${machine:0:3} == "arm" ]; then
machine="arm"
else
machine="x86" machine="x86"
fi fi
os="os_linux" os="os_linux"
......
...@@ -19,7 +19,7 @@ pwra_set_func() ...@@ -19,7 +19,7 @@ pwra_set_func()
# Command is "set base" # Command is "set base"
basename=$2 basename=$2
basename=${basename//\./\\.} basename=${basename//\./\\.}
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -67,7 +67,7 @@ pwra_set_func() ...@@ -67,7 +67,7 @@ pwra_set_func()
return return
fi fi
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -117,6 +117,7 @@ EOF ...@@ -117,6 +117,7 @@ EOF
pwra_parse () pwra_parse ()
{ {
unamestr=`eval uname` unamestr=`eval uname`
onamestr=`eval uname -o`
machine=`eval uname -m` machine=`eval uname -m`
if [ $unamestr == "Darwin" ]; then if [ $unamestr == "Darwin" ]; then
os="os_macos" os="os_macos"
...@@ -124,8 +125,18 @@ pwra_parse () ...@@ -124,8 +125,18 @@ pwra_parse ()
elif [ $unamestr == "FreeBSD" ]; then elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd" os="os_freebsd"
hw="hw_x86_64" hw="hw_x86_64"
elif [ $unamestr == "OpenBSD" ]; then
os="os_openbsd"
hw="hw_x86_64"
elif [ $onamestr == "Cygwin" ]; then
os="os_cygwin"
hw="hw_x86"
else else
if [ $machine != "x86_64" ]; then if [ $machine == "x86_64" ]; then
machine="x86_64"
elif [ ${machine:0:3} == "arm" ]; then
machine="arm"
else
machine="x86" machine="x86"
fi fi
os="os_linux" os="os_linux"
......
...@@ -19,7 +19,7 @@ pwra_set_func() ...@@ -19,7 +19,7 @@ pwra_set_func()
# Command is "set base" # Command is "set base"
basename=$2 basename=$2
basename=${basename//\./\\.} basename=${basename//\./\\.}
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -67,7 +67,7 @@ pwra_set_func() ...@@ -67,7 +67,7 @@ pwra_set_func()
return return
fi fi
baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\b"$basename"\b" | grep "\b"base"\b" | awk '{print $3}'` baseroot=`eval cat $pwra_db/pwr_projectlist.dat | grep "\s"$basename"\s" | grep "^"%base"\s" | awk '{print $3}'`
if [ -z $baseroot ]; then if [ -z $baseroot ]; then
echo "Unable to find base '$2'" echo "Unable to find base '$2'"
return return
...@@ -117,6 +117,7 @@ EOF ...@@ -117,6 +117,7 @@ EOF
pwra_parse () pwra_parse ()
{ {
unamestr=`eval uname` unamestr=`eval uname`
onamestr=`eval uname -o`
machine=`eval uname -m` machine=`eval uname -m`
if [ $unamestr == "Darwin" ]; then if [ $unamestr == "Darwin" ]; then
os="os_macos" os="os_macos"
...@@ -124,8 +125,18 @@ pwra_parse () ...@@ -124,8 +125,18 @@ pwra_parse ()
elif [ $unamestr == "FreeBSD" ]; then elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd" os="os_freebsd"
hw="hw_x86_64" hw="hw_x86_64"
elif [ $unamestr == "OpenBSD" ]; then
os="os_openbsd"
hw="hw_x86_64"
elif [ $onamestr == "Cygwin" ]; then
os="os_cygwin"
hw="hw_x86"
else else
if [ $machine != "x86_64" ]; then if [ $machine == "x86_64" ]; then
machine="x86_64"
elif [ ${machine:0:3} == "arm" ]; then
machine="arm"
else
machine="x86" machine="x86"
fi fi
os="os_linux" os="os_linux"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment