Skip to content

Commit

Permalink
Update i.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiland committed Oct 6, 2024
1 parent 4799bd3 commit cb3f534
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions i.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!/usr/bin/env bash
# Detect absolute and full path as well as filename of this script
cd "$(dirname "$0")" || exit
CURRDIR=$(pwd)
SCRIPT_FILENAME=$(basename "$0")
cd - > /dev/null || exit
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
SCRIPT_DIR=$(dirname "${sfp}")
if [[ $1 == "release" ]]
then
curl -sSL https://github.com/tmiland/Invidious-Updater/releases/latest/download/invidious_update.sh > invidious_update.sh && \
chmod +x invidious_update.sh
. /invidious_update.sh -i
"${SCRIPT_DIR}/${SCRIPT_FILENAME}" -i
else
curl -sSL https://github.com/tmiland/Invidious-Updater/raw/master/invidious_update.sh > invidious_update.sh && \
chmod +x invidious_update.sh
. ./invidious_update.sh -i
"${SCRIPT_DIR}/${SCRIPT_FILENAME}" -i
fi

0 comments on commit cb3f534

Please sign in to comment.