DEV Community

Discussion on: My three steps to more manageable bash profiles

Collapse
 
melezhik profile image
Alexey Melezhik • Edited

You may also use Sparrow to distribute your profiles. For example:

$ nano nickstuff # the source code as you had in the post
$ nano story.bash
  #!/bin/bash
  cp $story_dir/nickstuff ~/.nickstuff
  if ! grep -q 'source ~/.nickstuff' ~/.bashrc; then
    echo 'source ~/.nickstuff' >> ~/.bashrc
  fi
$ nano sparrow.json
  {
    "name" : "nick-bash-stuff",
    "version" : "0.0.1" 
  } 
$ sparrow plg upload 

And then on remote machine just:

   $ sparrow plg install nick-bash-stuff
   $ sparrow plg run nick-bash-stuff

Regards