Skip to content

Commit

Permalink
mostly a few comment additions
Browse files Browse the repository at this point in the history
  • Loading branch information
derpycode committed Dec 12, 2022
1 parent c3572a2 commit 6ad336b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions run-cupcake
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ if [ ! -f ~/.cgenierc ]; then
exit 0
fi
cgenie_root=`grep cgenie_root ~/.cgenierc | cut -d: -f2 | sed -e 's/^ *//'`
source $cgenie_root/tools/find_python
exec $PYTHON $cgenie_root/tools/run-cupcake.py $*
python3 tools/setup-cgenie.py $*
3 changes: 0 additions & 3 deletions setup-cgenie
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ if [ -f ~/.cgenierc ]; then
echo 'cTOASTER is already set up -- if you want to start over, remove ~/.cgenierc ($ rm ~/.cgenierc)'
exit 0
fi
#source tools/find_python
#alias python='/usr/bin/python3'
#exec $python tools/setup-cgenie.py
python3 tools/setup-cgenie.py
6 changes: 4 additions & 2 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import re, hashlib, glob
import subprocess as sp

# NOTE: The platform module in Python includes tools to see the platform's hardware, operating system , and interpreter version information where the program is running.


# Read cGENIE configuration.

Expand Down Expand Up @@ -44,8 +46,8 @@ def exists(p):
return os.path.exists(os.path.join(cgenie_root, 'platforms', p))

def discover():
host = platform.node()
os = platform.system().upper()
host = platform.node() # platform.node() returns the computer's network name.
os = platform.system().upper() # Returns the system/OS name. The upper() method returns a string where all characters are in upper case.
plat = platform.platform().split('-')[0].upper()
if exists(host): return host
if exists(os): return os
Expand Down

0 comments on commit 6ad336b

Please sign in to comment.