Skip to content

Commit

Permalink
remove old fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Feb 1, 2024
1 parent c2e5fa0 commit 3770257
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions advanced/Scripts/speedtestmod/mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,8 @@ setTags() {
local path=${1-}
local name=${2-}
local branch="${3-master}"
local url=${4-}
if [ ! -z "$path" ]; then
cd "$path"
if [ ! -z "$url" ]; then
git remote -v | grep -q "origin" && git remote remove origin
git remote add origin $url
fi
git fetch origin $branch:refs/remotes/origin/$branch -q
git fetch --tags -f -q
latestTag=$(git describe --tags $(git rev-list --tags --max-count=1))
Expand Down Expand Up @@ -72,12 +67,11 @@ download() {
fi
fi
else # replace
cd "$dest"
git config --global --add safe.directory "$dest"
git remote -v | grep -q "old" || git remote rename origin old
setTags $dest "" $branch $url
setTags $dest "" $branch
if [ ! -z "$src" ]; then
if [ "$url" != "old" ]; then
git config --global --add safe.directory "$dest"
git remote -v | grep -q "old" || git remote rename origin old
git remote -v | grep -q "origin" && git remote remove origin
git remote add origin $url
elif [ -d .git/refs/remotes/old ]; then
Expand Down Expand Up @@ -218,14 +212,14 @@ uninstall() {
cp -a $org_wp $curr_wp
chmod +x $curr_wp
rm -rf /opt/mod_pihole
rm -rf /opt/pihole/speedtestmod
fi

manageHistory ${1-}
}

purge() {
rm -rf "$admin_dir"*_admin
rm -rf /opt/pihole/speedtestmod
if [ -f /etc/systemd/system/pihole-speedtest.timer ]; then
rm -f /etc/systemd/system/pihole-speedtest.service
rm -f /etc/systemd/system/pihole-speedtest.timer
Expand Down

0 comments on commit 3770257

Please sign in to comment.