wip
This commit is contained in:
parent
f927596b3c
commit
d451150b77
1 changed files with 8 additions and 6 deletions
14
pika.sh
14
pika.sh
|
@ -264,18 +264,20 @@ script-exists() {
|
||||||
check-pika() {
|
check-pika() {
|
||||||
local url tmp bin
|
local url tmp bin
|
||||||
url="https://git.k4li.de/scripts/installs/raw/branch/main/pika.sh"
|
url="https://git.k4li.de/scripts/installs/raw/branch/main/pika.sh"
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp -d)"
|
||||||
bin=/usr/local/bin/pika
|
bin=/usr/bin/pika
|
||||||
|
|
||||||
if ! command-exists pika; then
|
if ! command-exists pika; then
|
||||||
pen "The 'pika' binary was not found on this system."
|
pen "The 'pika' binary was not found on this system."
|
||||||
if confirm "Do you want to install it now?" </dev/tty; then
|
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"
|
pen bold red "Copying binary now to $bin"
|
||||||
$_sudo cp $tmp $bin
|
$_sudo cp "${tmp}/pika" $bin
|
||||||
$_sudo chmod +x $bin
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue