[DO NOT UPDATE] Fix unlink() method once again
This commit is contained in:
parent
d2cd0e348f
commit
ecfa7c856b
1 changed files with 6 additions and 2 deletions
|
@ -1,9 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# jeremystartm's dotfiles "installer"
|
# jeremystartm's dotfiles "installer"
|
||||||
|
|
||||||
|
FORCED_UNLINKING=
|
||||||
|
|
||||||
# utility function
|
# utility function
|
||||||
function unlink() {
|
function unlink() {
|
||||||
if [ -a "${HOME}/${*}" ]; then
|
if [ -a "${HOME}/${*}" ] || [ -n "${FORCED_UNLINKING}" ]; then
|
||||||
echo ":: Unlinking ${1}"
|
echo ":: Unlinking ${1}"
|
||||||
rm -rf "${HOME:?}/${*:?}"
|
rm -rf "${HOME:?}/${*:?}"
|
||||||
fi
|
fi
|
||||||
|
@ -72,9 +74,11 @@ for arg in "${@}"; do
|
||||||
)
|
)
|
||||||
|
|
||||||
for path in "${legacypaths[@]}"; do
|
for path in "${legacypaths[@]}"; do
|
||||||
unlink "${path}"
|
FORCED_UNLINKING=y unlink "${path}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
rm -rf "jstmbash" "dracula-mc"
|
||||||
|
|
||||||
echo ":: Unlinked legacy paths"
|
echo ":: Unlinked legacy paths"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue