Skip to content

Commit

Permalink
fixing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
machellerogden committed Feb 10, 2017
1 parent 3dcac1a commit e69ded2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const fs = require('./lib/fs');
const path = require('path');
const inquirer = require('inquirer');
const os = require('os');

inquirer.prompt([
{
Expand Down Expand Up @@ -74,7 +75,8 @@ source $HOME/.bitcar/completions.sh
fs.copy(path.normalize(__dirname + '/dotfiles/strip_codes'), path.normalize(process.env.HOME + '/.bitcar/strip_codes'));
fs.copy(path.normalize(process.env.HOME + '/.bash_profile'), path.normalize(process.env.HOME + '/.bash_profile.bkup'));
const bashProfile = fs.read(path.normalize(process.env.HOME + '/.bash_profile'));
const cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar\n/gm, profileContent);
let cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar\n/gm, '');
cleanedProfile = cleanedProfile + os.EOL + profileContent);
fs.write(path.normalize(process.env.HOME + '/.bash_profile'), cleanedProfile);

fs.commit(function (err) {
Expand Down

0 comments on commit e69ded2

Please sign in to comment.