Rewrite ./ext/ setup scripts
This commit is contained in:
parent
c25c589281
commit
d31fe2166e
9 changed files with 97 additions and 47 deletions
17
ext/VARS
Normal file
17
ext/VARS
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CACHE_DIR="${HOME}/.emacs.d/private/cache/`hostname`/"
|
||||
ELPA_DIR="${HOME}/.emacs.d/.cask/`emacs --version | grep -E -o '2[4-9]\.[0-9\.]+'`/elpa"
|
||||
|
||||
is-mac() { [ "$(uname)" == "Darwin" ]; }
|
||||
is-linux() { [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; }
|
||||
|
||||
git-repo() {
|
||||
old=$(pwd)
|
||||
if [ -d "$2" ]; then
|
||||
cd "$2" && git pull
|
||||
else
|
||||
git clone --depth 1 --recursive "$1" "$2"
|
||||
fi
|
||||
cd "$old"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue