Commit d5a4ea4ba83328b5cc8cdf6c3504e95b19f1ad1f
Separate bin files for git-ssb and git-remote-ssb
- Simplify code - Support path separators other than / ref: %pBex2r2Hn8RBmdlCcGTM4O47UKPAfCdWvldhOWZ8yyU=.sha256cel committed on 2/27/2017, 3:53:08 AM
Parent: d97d03c4e98365899f1bdb1fa12303723f9f8711
Files changed
package.json | changed |
bin.js | deleted |
bin/git-remote-ssb | added |
bin/git-ssb | added |
package.json | |||
---|---|---|---|
@@ -2,10 +2,10 @@ | |||
2 | 2 … | "name": "git-ssb", | |
3 | 3 … | "version": "2.3.3", | |
4 | 4 … | "description": "git hosting on secure-scuttlebutt (ssb)", | |
5 | 5 … | "bin": { | |
6 | - "git-ssb": "bin.js", | ||
7 | - "git-remote-ssb": "bin.js" | ||
6 … | + "git-ssb": "bin/git-ssb", | ||
7 … | + "git-remote-ssb": "bin/git-remote-ssb" | ||
8 | 8 … | }, | |
9 | 9 … | "main": "bin.js", | |
10 | 10 … | "dependencies": { | |
11 | 11 … | "git-remote-ssb": "^2.0.3", |
bin.js | ||
---|---|---|
@@ -1,18 +1,0 @@ | ||
1 | -#!/bin/sh | |
2 | -':' //; exec "$(command -v node || command -v nodejs)" "$0" "$@" | |
3 | -// http://unix.stackexchange.com/questions/65235/universal-node-js-shebang | |
4 | - | |
5 | -if (/\/git-remote-ssb$/.test(process.argv[1])) { | |
6 | - require('git-remote-ssb/git-remote-ssb') | |
7 | - | |
8 | -} else { | |
9 | - var u = require('./lib/util') | |
10 | - var config = require('ssb-config/inject')(u.getAppName()) | |
11 | - var fn = require('./lib').fn | |
12 | - try { | |
13 | - fn(config) | |
14 | - } catch (e) { | |
15 | - console.error(e instanceof Error ? e.stack : e) | |
16 | - process.exit(1) | |
17 | - } | |
18 | -} |
bin/git-remote-ssb | ||
---|---|---|
@@ -1,0 +1,3 @@ | ||
1 … | +#!/bin/sh | |
2 … | +':' //; exec "$(command -v node || command -v nodejs)" "$0" "$@" | |
3 … | +require('git-remote-ssb/git-remote-ssb') |
bin/git-ssb | ||
---|---|---|
@@ -1,0 +1,13 @@ | ||
1 … | +#!/bin/sh | |
2 … | +':' //; exec "$(command -v node || command -v nodejs)" "$0" "$@" | |
3 … | +// http://unix.stackexchange.com/questions/65235/universal-node-js-shebang | |
4 … | + | |
5 … | +var u = require('../lib/util') | |
6 … | +var config = require('ssb-config/inject')(u.getAppName()) | |
7 … | +var fn = require('../lib').fn | |
8 … | +try { | |
9 … | + fn(config) | |
10 … | +} catch (e) { | |
11 … | + console.error(e instanceof Error ? e.stack : e) | |
12 … | + process.exit(1) | |
13 … | +} |
Built with git-ssb-web