Fix symlinker
This commit is contained in:
@@ -39,8 +39,6 @@ function printUsage() {
|
|||||||
console.log('node symlinker -h\tShow usage');
|
console.log('node symlinker -h\tShow usage');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(process.argv[2]);
|
|
||||||
|
|
||||||
if (process.argv.length >= 4 || process.argv.length <= 2) {
|
if (process.argv.length >= 4 || process.argv.length <= 2) {
|
||||||
if (process.argv.length >= 4) {
|
if (process.argv.length >= 4) {
|
||||||
console.log('Too many arguments.');
|
console.log('Too many arguments.');
|
||||||
@@ -49,7 +47,6 @@ if (process.argv.length >= 4 || process.argv.length <= 2) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch (process.argv[2].slice(1)) {
|
switch (process.argv[2].slice(1)) {
|
||||||
case 'i':
|
case 'i':
|
||||||
createSymlinks();
|
createSymlinks();
|
||||||
@@ -61,5 +58,5 @@ switch (process.argv[2].slice(1)) {
|
|||||||
printUsage();
|
printUsage();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Invalid option: ', process.argv[i]);
|
console.log('Invalid option: ', process.argv[2]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user