Skip to content

Commit 6658886

Browse files
committed
Simplify the default script
1 parent 891ec2a commit 6658886

File tree

1 file changed

+4
-16
lines changed
  • sql/files/defaultdata/judgehost_info

1 file changed

+4
-16
lines changed

sql/files/defaultdata/judgehost_info/run

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ output_file="$1"
1010
# Posted by fjarlq, modified by community. See post 'Timeline' for change history
1111
# Retrieved 2025-11-15, License - CC BY-SA 4.0
1212

13-
if [ "${SHELL#*"bash"}" != "${SHELL}" ]; then
14-
exec &>> "${output_file}"
15-
else
16-
# We can't use &>> as it's not POSIX,
17-
# this does introduce a racecondition
18-
exec 1>> "${output_file}"
19-
exec 2>> "${output_file}"
20-
fi
13+
# We can't use &>> as it's not POSIX,
14+
# this does introduce a racecondition
15+
exec 1>> "${output_file}"
16+
exec 2>> "${output_file}"
2117

2218
# Generic linux/distro information
2319
uname -a
@@ -34,12 +30,4 @@ cat /proc/cpuinfo
3430
free -h
3531
cat /proc/meminfo
3632

37-
if [ command -v hwinfo ]; then
38-
hwinfo --short
39-
fi
40-
41-
if [ command -v inxi ]; then
42-
inxi -Fx
43-
fi
44-
4533
exit 0

0 commit comments

Comments
 (0)