Available all over the web by vipulgupta2048
blah blah blah ... No one, cares.
Let's get cracking.
#!/bin/bash
#Run as root
sudo apt install git nano
git clone https://github.com/vipulgupta2048/dotvfiles
cd dotvfiles
ln -s .nanorc ~
echo "Finished installing Nano Editor"
from homely.files import symlink
from homely.install import installpkg
installpkg('nano',apt='nano')
symlink('.nanorc')
print("Finished Installing Nano Editor")
Automatic Cleaning
NO Password prompt when no TTY available
Automatically chooses - brew, yum or apt
The world is your oyster and the only thing that limits you is what you can see and imagine.
- Vipul Gupta
#!/bin/bash
# The first script that runs in the system
# Install essentials
sudo apt install git python3.6
pip install homely --user
# Configuring Homely assuming you already have a dotfiles repository
homely add https://www.github.com/vipulgupta2048/dotvfiles.git
# Assuming you have a HOMELY.py script
homely update
Supports multiple repositories without breaking a sweat
from homely.files import symlink, mkdir
from homely.install import installpkg
installpkg('nano')
installpkg('fish', apt='fish')
installpkg('geany', apt='geany', yum='geany')
symlink('.nanorc')
symlink('fish/config.fish', '~/.config/fish')
symlink('geany', '~/.config/geany')
print("Finished Setup")
Automatic Cleanup works here as well
# lineinfile(filename, contents, where=None)
from homely.files import lineinfile, WHERE_BOT
lineinfile('.bashrc', 'PATH=$HOME/dotfiles/bin:$PATH', WHERE_BOT)
Use lineinfile() to add a line to the end of your .bashrc:
Similarly, you can use homely.files.blockinfile() to add lines to the files.
Automatic Cleanup works here as well
from homely.pipinstall import pipinstall
from homely.install import installpkg
installpkg('python3')
pipinstall('ipython', ['pip3'])
pipinstall('requests', trypips=['pip', 'pip2', 'pip3'])
pipinstall('scrapy', ['pip2'])
You guessed it right, Automatic Cleanup works here as well.
Installing Python Packages through pip using homely.install.pipinstall()
And can easily invoke subprocesses in Python,
what more do you want???
it's easy, we got you covered.
# Assuming you have a git repo with an install.sh already:
# HOMELY.py
from os.path import dirname
from homely.system import execute
execute(['install.sh'], stdout="TTY", cwd=dirname(__file__))
Cherry pick what you like in other dotfiles. Keep what works, throw out what doesn't.
Questions? Any feedback
Did you like the talk? Tell me about it.
Vipul Gupta
Student, Programmer, Writer, Open-Source Contributor, C&H Comics Collector
Tweet @vipulgupta2048