From 3589f3e66769e87831e9f31fb3493064dd3ce73e Mon Sep 17 00:00:00 2001 From: Raul Benencia Date: Sun, 24 May 2020 13:23:20 -0700 Subject: Pave the way for bin/ in this repo --- .environment | 17 ++++++++--------- .environment.d/00-languages | 1 + Makefile | 10 ++++++++++ setup | 7 ------- 4 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 .environment.d/00-languages create mode 100644 Makefile delete mode 100755 setup diff --git a/.environment b/.environment index 37c7d55..ee5b0c8 100644 --- a/.environment +++ b/.environment @@ -35,13 +35,12 @@ export TMPDIR TMP=$HOME/tmp export TMP -export GOPATH=$HOME/src/go -PATH="$GOPATH/bin:$PATH" - -GEM=~/.gem/ruby/2.3.0/bin/ -# set PATH so it includes user's private bin if it exists -if [ -d "$GEM" ] ; then - PATH="$GEM:$PATH" +GOPATH=$HOME/src/go +PATH="$PATH:/usr/sbin:/sbin" + +# extra +if [ -d ~/.environment.d/ ]; then + for e in $(find ~/.environment.d/ -type l,f); do + . $e + done fi - -PATH="$HOME/bin:$HOME/.local/bin:$PATH:/usr/sbin:/sbin" diff --git a/.environment.d/00-languages b/.environment.d/00-languages new file mode 100644 index 0000000..d341671 --- /dev/null +++ b/.environment.d/00-languages @@ -0,0 +1 @@ +PATH="$GOPATH/bin:$PATH" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d23de90 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +cur_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) + +repo_dir := $(dir $(mkfile_path)) +bin_dir := $(repo_dir)bin +bin_file_name := 10-$(cur_dir) + +all: + $(bin_dir)/pycombine -e '(Makefile|bin|README.md)' "$(HOME)" "$(repo_dir)" + echo 'PATH=$(bin_dir):$$PATH' > ~/.environment.d/$(bin_file_name) diff --git a/setup b/setup deleted file mode 100755 index c5d1206..0000000 --- a/setup +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -script=$(realpath $0) -script_dir=$(dirname $script) - -# Combine all files -$HOME/bin/pycombine -e '(setup|README.md)' $HOME $script_dir -- cgit v1.2.3