Skip to content

Commit

Permalink
Add shebang line to the init_chain and run_chain scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarvaze committed Apr 23, 2018
1 parent 4577bba commit 0108df9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions populus/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"--password {password_path} --nodiscover --mine --minerthreads 1 "
)

SHEBANG = '#!/bin/sh'

GENESIS_BLOCK = '''
{
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
Expand Down Expand Up @@ -95,6 +97,8 @@ def new_local_chain(project_dir, chain_name):
)
init_geth_path = os.path.join(chain_dir, 'init_chain.sh')
with open(init_geth_path, 'w+') as f:
f.write(SHEBANG)
f.write('\n')
f.write(init)
chmod_plus_x(init_geth_path)

Expand All @@ -106,5 +110,7 @@ def new_local_chain(project_dir, chain_name):
)
run_geth_path = os.path.join(chain_dir, 'run_chain.sh')
with open(run_geth_path, 'w+') as f:
f.write(SHEBANG)
f.write('\n')
f.write(run)
chmod_plus_x(run_geth_path)

0 comments on commit 0108df9

Please sign in to comment.