@eshanized: push via script

This commit is contained in:
2024-03-08 00:04:55 +05:30
parent ca6f5ab056
commit dfa46f5237

View File

@@ -60,3 +60,40 @@ MATE)
terminal=mate-terminal terminal=mate-terminal
;; ;;
esac esac
if [ -z "$terminal" ] || ! command -v "$terminal" &>/dev/null; then
# shellcheck disable=SC2068
for i in ${term_order[@]}; do
if command -v "$i" &>/dev/null; then
terminal="$i"
break
fi
done
fi
if [ -z "$terminal" ]; then
notify-send -t 1500 --app-name=Snigdha\ OS "No Terminal Found!"
exit 1
fi
if [ "$terminal" == "kgx" ]; then
# shellcheck disable=SC2086
sed -i '2i sleep 0.1' $initfile
# shellcheck disable=SC2016
# shellcheck disable=SC2086
echo 'Kill -SIGNINT $PPID' >>$initfile
fi
eval "${terminals[${terminal}]}" || {
exitcode=$?
}
rm "$initfile"
if [ "$codefile" != "$initfile" ]; then
rm "$codefile"
fi
if [ ! -z "$exitcode" ] && [ "$exitcode" != 130 ]; then
exit 2
fi