From d03ce0c08c3316c495c1c80dde39f9502dd4b327 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sat, 4 Apr 2020 19:40:37 -0400 Subject: [PATCH] Implement recipe to install .deb files on Ubuntu --- .gitignore | 1 + Makefile | 10 +++++++++- install-debfiles | 10 ++++++++++ pkgs-ubuntu-debfiles.list | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 install-debfiles create mode 100644 pkgs-ubuntu-debfiles.list diff --git a/.gitignore b/.gitignore index 0118d7f..5041b40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bin/ deps/*/data +debfiles/ diff --git a/Makefile b/Makefile index 4dd417a..ca39916 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ MAKEFLAGS := --no-builtin-rules DEPS := $(wildcard deps/*) .PHONY: \ - default \ + default \ + clean \ $(DEPS) \ deps \ home \ @@ -64,6 +65,9 @@ pkgs_golang: list pkgs-golang.list pkgs_ubuntu: list pkgs-ubuntu.list sudo apt install $(shell ./list pkgs-ubuntu.list) +pkgs_ubuntu_debfiles: list pkgs-ubuntu-debfiles.list + ./install-debfiles pkgs-ubuntu-debfiles.list + # # PIP # @@ -140,3 +144,7 @@ diff: diff $(HOME)/lib/login_variables.sh home/lib/login_variables.sh || true diff $(HOME)/lib/login_variables_dpi_high.sh home/lib/login_variables_dpi_high.sh || true diff $(HOME)/lib/login_variables_dpi_norm.sh home/lib/login_variables_dpi_norm.sh || true + +clean: + rm -rf ./debfiles + cd src && make clean diff --git a/install-debfiles b/install-debfiles new file mode 100755 index 0000000..dca769f --- /dev/null +++ b/install-debfiles @@ -0,0 +1,10 @@ +#! /bin/sh + +set -e + +file=$(readlink -e "$1") + +mkdir -p debfiles +cd debfiles || exit 1 +../list "$file" | xargs -P 2 -I % wget -c '%' +sudo apt install ./*.deb diff --git a/pkgs-ubuntu-debfiles.list b/pkgs-ubuntu-debfiles.list new file mode 100644 index 0000000..1575014 --- /dev/null +++ b/pkgs-ubuntu-debfiles.list @@ -0,0 +1,2 @@ +# +https://github.com/sharkdp/bat/releases/download/v0.13.0/bat_0.13.0_amd64.deb -- 2.20.1