Update linkFile.sh
This commit is contained in:
parent
1bb74bf6c6
commit
ab90cd4ba5
35
linkFiles.sh
35
linkFiles.sh
|
@ -2,30 +2,31 @@
|
||||||
|
|
||||||
DOTFILES_HOME=$(pwd -P)
|
DOTFILES_HOME=$(pwd -P)
|
||||||
DOTFILES_CONFIG="$(pwd -P)/.config"
|
DOTFILES_CONFIG="$(pwd -P)/.config"
|
||||||
|
DOTFILES_ICONS="$(pwd -P)/.icons"
|
||||||
|
DOTFILES_SSH="$(pwd -P)/.ssh"
|
||||||
|
|
||||||
for src in $(find -H "$DOTFILES_HOME" -not -path '*.git*' -not -path '*.config*' -not -path '*.ssh*' -not -path '*.icons*'); do
|
for src in $(find -H "$DOTFILES_HOME" -not -path '*.git*' -not -path '*.config*' -not -path '*.ssh*' -not -path '*.icons*'); do
|
||||||
if [ "$(basename "${src}")" = "CocoRice" ]; then
|
if [ "$(basename "${src}")" = "CocoRice" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#echo "$src"
|
|
||||||
#echo "$HOME/test/$(basename "${src}")"
|
|
||||||
ln -s "$src" "$HOME/test/$(basename "${src}")"
|
ln -s "$src" "$HOME/test/$(basename "${src}")"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for initialFolder in "$DOTFILES_CONFIG" "$DOTFILES_ICONS" "$DOTFILES_SSH"; do
|
||||||
|
for src in $(find -H "$initialFolder"); do
|
||||||
|
if [[ -d "$src" ]]; then
|
||||||
|
var=$(echo "$src" | awk '{ sub(/.*CocoRice\//, ""); print }')
|
||||||
|
|
||||||
for src in $(find -H "$DOTFILES_CONFIG"); do
|
if [[ ! -d "$HOME/test/$var" ]]; then
|
||||||
if [[ -d "$src" ]]; then
|
echo "$HOME/test/$var" "doesn't exists"
|
||||||
var=$(echo "$src" | awk '{ sub(/.*CocoRice\//, ""); print }')
|
mkdir -p "$HOME/test/$var"
|
||||||
if [[ ! -d "$HOME/test/$var" ]]; then
|
fi
|
||||||
echo "$HOME/test/$var" "doesn't exists"
|
fi
|
||||||
mkdir -p "$HOME/test/$var"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f "$src" ]]; then
|
if [[ -f "$src" ]]; then
|
||||||
#awk '{ sub(/.*CocoRice\//, ""); print }' <<< "$src"
|
var=$(echo "$src" | awk '{ sub(/.*CocoRice\//, ""); print }')
|
||||||
var=$(echo "$src" | awk '{ sub(/.*CocoRice\//, ""); print }')
|
ln -s "$src" "$HOME/test/$var"
|
||||||
ln -s "$src" "$HOME/test/$var"
|
fi
|
||||||
fi
|
done
|
||||||
done
|
done
|
Loading…
Reference in New Issue