mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
fix role-reversal of arch and cpu-count
define arch correctly
This commit is contained in:
parent
d4367660ff
commit
b8c85d8496
2 changed files with 11 additions and 11 deletions
11
bin/arch
11
bin/arch
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# cpu-count: count cpu's on a systems
|
||||
# arch: print the machine architecture
|
||||
# Copyright (C) 2008 Canonical Ltd.
|
||||
#
|
||||
# Authors: Dustin Kirkland <kirkland@canonical.com>
|
||||
|
@ -17,9 +17,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "on"
|
||||
p="cpu-count"
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
# Default is "off"
|
||||
p="arch"
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
|
||||
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
||||
[ "$count" = "1" ] || echo $count"x"
|
||||
uname -m
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# arch: print the machine architecture
|
||||
# cpu-count: count cpu's on a systems
|
||||
# Copyright (C) 2008 Canonical Ltd.
|
||||
#
|
||||
# Authors: Dustin Kirkland <kirkland@canonical.com>
|
||||
|
@ -17,8 +17,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Default is "off"
|
||||
p="arch"
|
||||
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||
# Default is "on"
|
||||
p="cpu-count"
|
||||
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||
|
||||
uname -m
|
||||
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
||||
[ "$count" = "1" ] || echo $count"x"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue