feat: run all handlers in a tempdir
This commit is contained in:
parent
c605b6af8d
commit
eada9a0b9c
8 changed files with 14 additions and 13 deletions
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Install a package from a local or downloaded .deb-file and remove it
|
||||
loc="/tmp/install.deb"
|
||||
loc="$(basename "$arg")"
|
||||
case "$1" in
|
||||
(http*) sudo wget -O "$loc" "$arg";;
|
||||
(http*) wget -O "$loc" "$arg";;
|
||||
(*) loc="$arg";;
|
||||
esac
|
||||
sudo dpkg -i "$loc"
|
||||
sudo apt -f install
|
||||
sudo rm -f "$loc"
|
||||
sudo rm -v "$loc"
|
||||
|
|
|
@ -3,7 +3,6 @@ case "$1" in
|
|||
(*://*) url=$1;;
|
||||
(*) url=https://aur.archlinux.org/$1.git;;
|
||||
esac
|
||||
cd "$(mktemp -d)"
|
||||
git clone "$url"
|
||||
cd $(basename "${1%.git}")
|
||||
makepkg -si
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
case $1 in
|
||||
(*://*) cd "$(mktemp -d)"
|
||||
git clone "$1"
|
||||
(*://*) git clone "$1"
|
||||
cd "$(basename "${1%.git}")";;
|
||||
(*) cd "$1";;
|
||||
esac
|
||||
|
|
7
instalee
7
instalee
|
@ -47,12 +47,14 @@ installpkg() {
|
|||
set -e
|
||||
local name="$(basename $pkg)"
|
||||
local base="${name%_*}"
|
||||
echo "[1mDependencies[0m"
|
||||
for dependency in $(cat "${pkgdir}depends" "${pkgdir}${base}_depends" 2>/dev/null)
|
||||
do runinstalee $dependency
|
||||
do runinstalee $dependency | sed 's/^/ /'
|
||||
done
|
||||
|
||||
local ext="${name#$base}"
|
||||
local handler="$homedir/handlers/$base"
|
||||
cd $(mktemp -d --tmpdir=$execdir $pkg.XXXX)
|
||||
if test -d "$handler"
|
||||
then
|
||||
# This declaration needs to be ahead, otherwise it overrides failing exit codes
|
||||
|
@ -118,6 +120,9 @@ case "$1" in
|
|||
;;
|
||||
esac
|
||||
|
||||
execdir=/tmp/instalee.%(date +%s)
|
||||
mkdir -p $execdir
|
||||
cd $execdir
|
||||
runinstalee() {
|
||||
groupfile="$homedir/groups/$1"
|
||||
if test -f "$groupfile"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh -ex
|
||||
cd "$(mktemp -d)"
|
||||
OS="$(uname | tr '[:upper:]' '[:lower:]')"
|
||||
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
|
||||
KREW="krew-${OS}_${ARCH}"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
cd "$(mktemp -d)"
|
||||
git clone https://github.com/grafana/loki.git
|
||||
cd loki
|
||||
make logcli >&2
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
cd /opt
|
||||
git clone git://github.com/sickill/stderred.git
|
||||
cd stderred
|
||||
make
|
||||
case "$LD_PRELOAD" in *libstderred.so*) ;; *) echo 'export LD_PRELOAD="/opt/stderred/build/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"'>>$HOME/.zprofile;; esac
|
||||
case "$LD_PRELOAD" in (*libstderred.so*) ;;
|
||||
(*) echo 'export LD_PRELOAD="/opt/stderred/build/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"'>>$HOME/.zprofile;; esac
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
cd "$(mktemp -d)"
|
||||
#!/bin/sh -e
|
||||
git clone https://github.com/nonpop/xkblayout-state
|
||||
cd xkblayout-state
|
||||
make
|
||||
|
|
Loading…
Add table
Reference in a new issue