X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=Makefile;h=bbd460e2a728f22a994eb1c3348303b1f25207ae;hb=1b768493f82ee6f5573a90168837830005344b92;hp=d54f46b4a13c55708c6285b1804f1172c380a576;hpb=0b63d66210f0bfefc55e73d52409117496ecc7b5;p=khome.git diff --git a/Makefile b/Makefile index d54f46b..bbd460e 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,11 @@ MAKEFLAGS := --no-builtin-rules DEPS := $(wildcard deps/*) ifeq ($(shell uname),Darwin) + GREP := ggrep SED := gsed DIFF := $(shell gls -t1 /usr/local/Cellar/diffutils/*/bin/diff | head -1) else + GREP := grep SED := sed DIFF := diff endif @@ -21,11 +23,13 @@ endif mpdconf \ pkgs_brew_cask_install \ pkgs_brew_install \ + pkgs_cargo \ pkgs_deb_install \ pkgs_deb_purge \ pkgs_debian \ pkgs_mac \ - pkgs_pip \ + pkgs_pip_install \ + pkgs_pip_upgrade \ pkgs_snap_classic \ pkgs_snap_strict @@ -36,24 +40,18 @@ default: @exit 1 home: mpdconf compiled - @cp -Rp bin $(HOME)/ - @cp -Rp home/bin $(HOME)/ - @cp -Rp home/lib $(HOME)/ - @cp home/.compton.conf $(HOME)/ - @cp -Rp home/.config/ $(HOME)/ - @cp -Rp home/.newsboat/ $(HOME)/ - @cp home/.profile $(HOME)/ - @cp home/.fonts.conf $(HOME)/ - @cp home/.Rprofile $(HOME)/ - @cp home/.tmux.conf $(HOME)/ - @cp home/.xbindkeysrc $(HOME)/ + cp -Rp bin $(HOME)/ + # Limit depth because directories are copied recursively: + find home -maxdepth 1 -print0 \ + | $(GREP) -zv '^home$$' \ + | xargs -0 -I% cp -Rp % ~ mpdconf: - @mkdir -p ~/Archives/Audio - @mkdir -p ~/var/lib/mpd/playlists - @mkdir -p ~/var/log/mpd - @mkdir -p ~/var/run/mpd - @cp home/.mpdconf $(HOME)/ + mkdir -p ~/Archives/Audio + mkdir -p ~/var/lib/mpd/playlists + mkdir -p ~/var/log/mpd + mkdir -p ~/var/run/mpd + cp home/.mpdconf $(HOME)/ compiled: mkdir -p bin @@ -61,13 +59,13 @@ compiled: mv src/clockloop bin/ font_cache: - @fc-cache -fv + fc-cache -fv # # Golang # pkgs_golang: list pkgs-golang.list - go get $(shell ./list pkgs-golang.list) + go get -u $(shell ./list pkgs-golang.list) # # Ubuntu @@ -81,8 +79,18 @@ pkgs_ubuntu_debfiles: list pkgs-ubuntu-debfiles.list # # PIP # -pkgs_pip: - sudo pip3 install $(shell ./list pkgs-pip.list) +pkgs_pip_install: + pip3 install --user $(shell ./list pkgs-pip.list) + +pkgs_pip_upgrade: + pip3 install --user --upgrade $(shell ./list pkgs-pip.list) + +# +# Rust (cargo) +# + +pkgs_cargo: list pkgs-cargo.list + cargo install $(shell ./list pkgs-cargo.list) # # Homebrew/Mac