Install dev tools in make install
way.
Named after the first city in recorded history, Uruk is designed to simplify installing dev tools on a new mac.
Notice that it only works on macOS for now.
git clone https://github.com/medopaw/uruk.git
Or download https://github.com/medopaw/uruk/archive/master.zip and extract to lcoal directory.
First enter Uruk directory.
cd uruk # Or `cd uruk-master` if it's extracted from github zip file
And then you can install all things your need in just one line.
make install
If a popup update window appears and ask you to install xcode-select command line developer tools, click "Install" and wait till it finishes.
By default, this will install git (brew version), python (pyenv version) and ruby (rbenv version) if nothing modified.
Uruk is shipped with default.conf
to make it work out-of-box. It is recommend to create custom.conf
to override default settings.
If custom.conf
is found, default.conf
in the same directory will be ignored.
And custom.conf
is in .gitignore
, so that you can keep your own configuration and don't have to merge with new git commits after updating Uruk.
Of course you can edit default.conf
directly and include changes and submit to git commit and share with other developers.
You can configure multiple tools in custom.conf
like this:
python
ruby
or
python ruby
And then run
make install
and both python and ruby will be installed.
If no custom.conf
was found, Uruk will read from default.conf
.
Uruk use command -v
to check if a target is installed. You can specify different checking method in is_installed.sh
in the folder with target name.
The status code explicitly or implicitly returned from is_installed
will be used to check if it is installed: 0
means installed, otherwise not installed.
Often a customized is_installed
is needed if you want to use brew
or other installed version instead of system default version.
Though not recommended, you can also run install.sh
and specify things to install in command-line.
chmod +x install.sh
./install.sh python ruby
- brew
- fzf
- git
- docker
- pyenv
- python
- rbenv
- ruby
- tig
- tldr
- autojump
- ranger
- iterm2
- firefox
- google-chrome
- sublime-text
- visual-studio-code
- pycharm-ce-with-anaconda-plugin
- github
- switchhosts
- sogouinput
- baiduinput
- neteasemusic
- qqmusic
- baidunetdisk
All depended targets will be installed first. The dependency is specified in installation scripts by calling install_if_need
. You can modify installation script to customize your own installation.
For what is shipped, e.g. pyenv, fzf and brew will be installed before installing python.
For every install target (i.e. python, ruby, etc.), Uruk decides which install script(s) should be run first by retrieving name(s) from:
- Command-line parameter
- Read from
custom.conf
. Content in this file will be treated as an array separated by any blank characters. - Read from
default.conf
. The format is the same withcustom.conf
.
For each name retrieved in step 1 or 2, Uruk will try to resolve it and run specific script. Let's say the name is "python" --
- If
targets/python/is_installed.sh
exists, use its returned value (true
or0
means installed, otherwise not installed) - If
targets/python.brewtarget
exists, treat it as a brew target and check ifbrew list python
has0
exit code. - If
targets/python.casktarget
exists, treat it as a cask target and check ifbrew list --cask python
has0
exit code. - Run
command -v python
to check ifpython
is installed
- Uruk will try to run
python/install.sh
. - If
python/install.sh
does not exist, Uruk will try to runpython.sh
under current directory instead. - If
python.sh
does not exist either, a message will appear, telling you Uruk can't locate any install script. - If
targets/python.brewtarget
exists, treat it as a brew target and runbrew install python
. - If
targets/python.casktarget
exists, treat it as a cask target and runbrew install python
.