mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Fix dot-put script
This commit is contained in:
parent
0d3c5f1db4
commit
a1f9a7c82d
|
@ -2,8 +2,9 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
dotdir="$HOME/dots"
|
dotdir="$HOME/dots"
|
||||||
dothome="$dotdir/home"
|
# the trailing slashes are important here!
|
||||||
dotroot="$dotdir/root"
|
dothome="$dotdir/home/"
|
||||||
|
dotroot="$dotdir/root/"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$0"
|
echo "$0"
|
||||||
|
@ -21,7 +22,7 @@ Details:
|
||||||
}
|
}
|
||||||
|
|
||||||
dotcopy() {
|
dotcopy() {
|
||||||
syspath="$1"
|
syspath="$(realpath "$1")"
|
||||||
|
|
||||||
if [[ "$syspath" == "$HOME"* ]]; then
|
if [[ "$syspath" == "$HOME"* ]]; then
|
||||||
dotpath="${syspath/#$HOME/$dothome}"
|
dotpath="${syspath/#$HOME/$dothome}"
|
||||||
|
|
Loading…
Reference in a new issue