mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-16 20:49:10 +00:00
fix realpath/readlink for issue #6
This commit is contained in:
@@ -83,6 +83,9 @@ sudo pip3 install -r dotdrop/requirements.txt
|
|||||||
|
|
||||||
Finally import your dotfiles as described [below](#usage).
|
Finally import your dotfiles as described [below](#usage).
|
||||||
|
|
||||||
|
For MacOS users, make sure to install `realpath` through homebrew
|
||||||
|
(part of *coreutils*).
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
If starting fresh, the import function of dotdrop
|
If starting fresh, the import function of dotdrop
|
||||||
|
|||||||
13
dotdrop.sh
13
dotdrop.sh
@@ -2,8 +2,19 @@
|
|||||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
# author: deadc0de6 (https://github.com/deadc0de6)
|
||||||
# Copyright (c) 2017, deadc0de6
|
# Copyright (c) 2017, deadc0de6
|
||||||
|
|
||||||
|
# check for readlink/realpath presence
|
||||||
|
# https://github.com/deadc0de6/dotdrop/issues/6
|
||||||
|
rl="readlink -f"
|
||||||
|
${rl} >/dev/null 2>&1
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
rl="realpath"
|
||||||
|
hash ${rl}
|
||||||
|
[ "$?" != "0" ] && echo "\"${rl}\" not found !" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# setup variables
|
||||||
args="$@"
|
args="$@"
|
||||||
cur=`dirname $(readlink -f $0)`
|
cur=`dirname $(${rl} ${0})`
|
||||||
opwd=`pwd`
|
opwd=`pwd`
|
||||||
bin="${cur}/dotdrop/dotdrop.py"
|
bin="${cur}/dotdrop/dotdrop.py"
|
||||||
cfg="${cur}/config.yaml"
|
cfg="${cur}/config.yaml"
|
||||||
|
|||||||
Reference in New Issue
Block a user