-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #661 We avoid Promises to allow this script to run under older system versions of node.
- Loading branch information
1 parent
d5df315
commit 2974075
Showing
3 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/env node | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
try { | ||
const script = process.argv[2] || '/usr/local/bin/agoric'; | ||
const cli = path.resolve(__dirname, '../packages/agoric-cli/bin/agoric'); | ||
const content = `\ | ||
#! /bin/sh | ||
# AUTOMATICALLY GENERATED by ${process.argv[1]} | ||
# Always execute the checked-out Agoric CLI with the --sdk flag. | ||
exec ${cli} --sdk \${1+"\$@"} | ||
`; | ||
console.log(`creating ${script}`); | ||
fs.writeFileSync(script, content); | ||
fs.chmodSync(script, '0755'); | ||
} catch (e) { | ||
console.error(err); | ||
process.exit(1); | ||
} | ||
|
||
process.exit(0); |
This file was deleted.
Oops, something went wrong.