in bash, how to load and execute an external bash script from a server, like github?

0

I'm thinking maybe I could have my ~/.bashrc (or other such customization bash file) live on my github and load it from whatever remote shell I log into with a command. Is that possible, and if so how?

laggingreflex

Posted 2014-08-08T20:17:15.890

Reputation: 3 498

1

I guess you can wget it and execute as any other script. The files can have a perma-link to their raw contents: example. Have you tried it?

– luk32 – 2014-08-08T20:19:55.913

Answers

0

The thing that popped in my head first was Fuse, with a git plugin

These seem a bit nottotallypolished-ish, are you wedded to git? Or can you use another "my cloud" tool, like DropBox, or BitTorent Sync. At least mount read-only if that's an option.

I'd also worry about the fallback. What if you're on your laptop with no Net connection? What if your git server is down? You're now stuck with no files. I'd lean towards BitTorrent Sync, which has files on disk at all times, and updates when it can. @luk32 has a good idea for reading, though you'd have to figure out your own write protocol.

Rich Homolka

Posted 2014-08-08T20:17:15.890

Reputation: 27 121

I don't think the OP is looking to have his whole home directory stored elsewhere, just a script. – Steve – 2014-08-08T20:40:25.470