Skip to content

Commit 8079fa5

Browse files
authored
Update index.html
1 parent 47ad3f2 commit 8079fa5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

index.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@
4949
5050
#!/usr/bin/env bash
5151
52-
if [[ ! -t 0 && "${BASH_SOURCE[0]}" == "$0" ]]; then
52+
if [[ ! -t 0 ]]; then
5353
echo "🧪 Terdeteksi: dijalankan via pipe (| bash)"
5454
exit 2
5555
elif [[ -t 0 && "${BASH_SOURCE[0]}" == "$0" ]]; then
5656
echo "🧑 Interaktif: dijalankan langsung (bash script.sh)"
5757
exit 3
58-
elif [[ -n "${BASH_SOURCE[0]}" ]]; then
58+
elif [[ -z "${BASH_SOURCE[0]}" ]]; then
5959
echo "📦 Terdeteksi: dijalankan via source"
6060
exit 4
6161
fi
@@ -171,10 +171,7 @@
171171
IFS=$'\n' read -d '' -r -a file_list < <(ls -Art ~/bin/*.sh)
172172
IFS=$'\n' read -d '' -r -a file_list < <(printf "%s\n" "${file_list[@]}" | xargs -n1 basename)
173173
174-
if [ ! -t 0 ]; then
175-
echo "[error] This script requires an interactive terminal (tty)." >&2
176-
return 1
177-
fi
174+
178175
179176
select weapon in "${file_list[@]}" "EXIT"; do
180177
{
@@ -262,10 +259,7 @@
262259
echo -e "Info : $a_href
263260
Author: <adharudin14@gmail.com>"
264261
printf %"$(tput cols)"s | tr " " "-"
265-
if [ ! -t 0 ]; then
266-
echo "[error] This script requires an interactive terminal (tty)."
267-
exit 1
268-
fi
262+
269263
select filename in Exit "Add repository and termux-url-opener plugin" "Fix issue if any" ${files};
270264
do
271265
[[ -n $filename ]] || { echo "$warn :What's that? Please try again." >&2; continue; }

0 commit comments

Comments
 (0)