Skip to content

Commit 78b8938

Browse files
committed
better
1 parent c95d391 commit 78b8938

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Linux/install_ix.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,19 @@
6969
##Install: https://stal-ix.github.io/IX.html
7070
# : https://stal-ix.github.io/IX_standalone
7171
if [[ -d "${HOME}" ]]; then
72-
pushd "${HOME}" &>/dev/null && \
73-
sudo rm -rvf "/ix" 2>/dev/null
74-
rm -rvf "${HOME}/ix" 2>/dev/null
75-
git clone --depth="1" --filter="blob:none" --quiet "${GIT_REPO:-https://github.com/stal-ix/ix}"
72+
pushd "${HOME}" &>/dev/null
73+
#Purge Previous Install
74+
if [[ "${RESET_ALL}" = "1" ]] || [[ "${RESET_ALL}" = "ON" ]]; then
75+
sudo rm -rvf "/ix" 2>/dev/null
76+
rm -rvf "${HOME}/ix" 2>/dev/null
77+
fi
78+
#Reset/Clone Repo
79+
if [[ -d "${HOME}/ix/.git" ]]; then
80+
git -C "${HOME}/ix/" reset --hard
81+
else
82+
git clone --depth="1" --filter="blob:none" --quiet "${GIT_REPO:-https://github.com/stal-ix/ix}"
83+
fi
84+
#Create Launcher
7685
if [[ -d "${HOME}/ix" ]] && [[ "$(du -s "${HOME}/ix" | cut -f1)" -gt 10 ]]; then
7786
if [[ -s "${HOME}/ix/ix" ]]; then
7887
chmod 'a+x' "${HOME}/ix/ix"

0 commit comments

Comments
 (0)