fix role-reversal of arch and cpu-count

define arch correctly
This commit is contained in:
Dustin Kirkland 2009-03-13 00:14:52 -05:00
commit b8c85d8496
2 changed files with 11 additions and 11 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# #
# cpu-count: count cpu's on a systems # arch: print the machine architecture
# Copyright (C) 2008 Canonical Ltd. # Copyright (C) 2008 Canonical Ltd.
# #
# Authors: Dustin Kirkland <kirkland@canonical.com> # Authors: Dustin Kirkland <kirkland@canonical.com>
@ -17,9 +17,8 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Default is "on" # Default is "off"
p="cpu-count" p="arch"
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
count=`grep -c "^processor.*:" /proc/cpuinfo` uname -m
[ "$count" = "1" ] || echo $count"x"

View file

@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# #
# arch: print the machine architecture # cpu-count: count cpu's on a systems
# Copyright (C) 2008 Canonical Ltd. # Copyright (C) 2008 Canonical Ltd.
# #
# Authors: Dustin Kirkland <kirkland@canonical.com> # Authors: Dustin Kirkland <kirkland@canonical.com>
@ -17,8 +17,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Default is "off" # Default is "on"
p="arch" p="cpu-count"
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0 grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
uname -m count=`grep -c "^processor.*:" /proc/cpuinfo`
[ "$count" = "1" ] || echo $count"x"