Skip to content

Instantly share code, notes, and snippets.

@walaura
Last active June 5, 2018 10:17
Show Gist options
  • Save walaura/11180d7574078894f870b546772226ae to your computer and use it in GitHub Desktop.
Save walaura/11180d7574078894f870b546772226ae to your computer and use it in GitHub Desktop.
tableau-aws.js
#!/usr/bin/env node
/*
run `./tableau-aws on` to let tableau run
run `./tableau-aws off` to let sbt run
*/
const fs = require('fs');
const normalPath = '/Library/Java/Extensions';
const fixedPath = '/Library/Java/Extensions-tableau';
const operation = process.argv.includes('on')?[fixedPath,normalPath]:[normalPath,fixedPath]
console.log(`Moving ${operation[0]} to ${operation[1]}`);
fs.renameSync(...operation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment