mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-18 04:53:57 +01:00
Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running "make clean all" inside jw-build. packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code. The idea is to 1) Further remove bloat from the remaining bits 2) Re-add what's necessary to build and package other essential repos. The decision should be based on whether or not jw-build can also be useful in a non-janware context. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c36c83c164
commit
bc883deed4
199 changed files with 0 additions and 18851 deletions
|
|
@ -1,121 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
log()
|
||||
{
|
||||
echo $@ >&2
|
||||
}
|
||||
|
||||
err()
|
||||
{
|
||||
echo $@ >&2
|
||||
}
|
||||
|
||||
fatal()
|
||||
{
|
||||
err "Giving up: $@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
cat<<-EOT
|
||||
$myname cmd args
|
||||
EOT
|
||||
}
|
||||
|
||||
run()
|
||||
{
|
||||
log "Running ==== $@"
|
||||
"$@"
|
||||
}
|
||||
|
||||
cmd_install()
|
||||
{
|
||||
local env opts global_opts
|
||||
local non_interactive
|
||||
|
||||
set -- `getopt 'y' $*`
|
||||
while [ "$1" != -- ] ; do
|
||||
case "$1" in
|
||||
-y)
|
||||
non_interactive=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
case $ID in
|
||||
opensuse|suse)
|
||||
[ "$non_interactive" = 1 ] && {
|
||||
opts="--force-resolution --auto-agree-with-licenses"
|
||||
global_opts="$global_opts --non-interactive --gpg-auto-import-keys --no-gpg-checks"
|
||||
}
|
||||
run sudo $env -S zypper $global_opts install $opts "$@"
|
||||
;;
|
||||
debian|ubuntu|raspbian)
|
||||
[ "$non_interactive" = 1 ] && {
|
||||
global_opts="$global_opts -yq"
|
||||
env="$env DEBIAN_FRONTEND=noninteractive"
|
||||
}
|
||||
run sudo $env -S apt-get $global_opts install "$@"
|
||||
;;
|
||||
arch)
|
||||
[ "$non_interactive" = 1 ] && {
|
||||
global_opts="$global_opts --noconfirm"
|
||||
env="$env DEBIAN_FRONTEND=noninteractive"
|
||||
}
|
||||
run sudo $env -S pacman $global_opts -S --needed "$@"
|
||||
;;
|
||||
centos)
|
||||
run sudo $env -S yum $global_opts install -y "$@"
|
||||
;;
|
||||
*)
|
||||
fatal "Tried to install on unsupported platform \"$ID\""
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
cmd_refresh()
|
||||
{
|
||||
local env opts global_opts
|
||||
local non_interactive
|
||||
|
||||
set -- `getopt 'y' $*`
|
||||
while [ "$1" != -- ] ; do
|
||||
case "$1" in
|
||||
-y)
|
||||
non_interactive=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
case $ID in
|
||||
opensuse|suse)
|
||||
[ "$non_interactive" = 1 ] && {
|
||||
global_opts="$global_opts --non-interactive --gpg-auto-import-keys --no-gpg-checks"
|
||||
}
|
||||
run sudo $env -S zypper $global_opts refresh $opts "$@"
|
||||
;;
|
||||
debian|ubuntu|raspbian)
|
||||
run sudo $env -S apt-get $global_opts update "$@"
|
||||
;;
|
||||
centos)
|
||||
run sudo $env -S yum $global_opts clean expire-cache "$@"
|
||||
run sudo $env -S yum $global_opts makecache "$@"
|
||||
;;
|
||||
*)
|
||||
fatal "Tried to update unsupported platform \"$ID\""
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# -- here we go
|
||||
myname=`basename $0`
|
||||
. /etc/os-release
|
||||
ID=${ID%%-*}
|
||||
cmd="$1"
|
||||
shift
|
||||
cmd_$cmd "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue