dockerised tests

This commit is contained in:
Andrejus
2020-02-27 23:16:56 +00:00
parent 5074d56184
commit e2bd54995a
28 changed files with 488 additions and 66 deletions

View File

@@ -4,20 +4,27 @@
#
update() {
sudo apt-get update -y
sudo apt-get update -qq
}
# Non-interactive upgrade
upgrade() {
DEBIAN_FRONTEND=noninteractive \
sudo apt-get dist-upgrade -y \
sudo apt-get dist-upgrade -qq \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold"
}
# @arg $1 packages to install
install() {
sudo apt-get install -y $1
sudo apt-get install -qq $1
refresh
}
# @arg $1 package list file to install
install_file() {
sudo apt-get install -qq $(cat $1)
refresh
}
# @arg $1 repository to add
@@ -41,6 +48,7 @@ run() {
# @arg $1 source folder
# @arg $2 target folder
link_folder() {
mkdir -p $2
cp -srf $1/. $2
}
@@ -51,6 +59,18 @@ not_installed() {
! [ -x "$(command -v $1)" ]
}
# Refreshes PATH
refresh() {
hash -r
}
# Add to PATH and refresh
# @arg $1 path to add to PATH
add_path() {
export PATH="$1:$PATH"
refresh
}
# Colors
C_BLACK='\033[0;30m'
C_DGRAY='\033[1;30m'