This commit is contained in:
pika 2025-06-25 20:56:56 +02:00
parent f927596b3c
commit d451150b77

14
pika.sh
View file

@ -264,18 +264,20 @@ script-exists() {
check-pika() {
local url tmp bin
url="https://git.k4li.de/scripts/installs/raw/branch/main/pika.sh"
tmp="$(mktemp)"
bin=/usr/local/bin/pika
tmp="$(mktemp -d)"
bin=/usr/bin/pika
if ! command-exists pika; then
pen "The 'pika' binary was not found on this system."
if confirm "Do you want to install it now?" </dev/tty; then
curl -o $tmp -fsSL "$url"
cd $tmp || mkdir -p $tmp && cd $tmp
if curl -o pika -fsSL "$url"; then
$_sudo chmod +x ./pika
fi
if [ -f "$tmp" ]; then
if [ -f "${tmp}/pika" ]; then
pen bold red "Copying binary now to $bin"
$_sudo cp $tmp $bin
$_sudo chmod +x $bin
$_sudo cp "${tmp}/pika" $bin
fi
fi
else