diff options
Diffstat (limited to 'depm')
| -rwxr-xr-x | depm | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#!/bin/sh + +os=$(cat /etc/os-release | grep ID | head -n 1) +DEPMFILE=Depmfile + +if [[ ! -f Depmfile ]]; then + echo "This repository does not have a Depmfile." + exit +fi + +install_arch() { + ARCH_PACKAGES=$(grep ARCH_PACKAGES ${DEPMFILE} | sed 's/ARCH_PACKAGES: //g') + if [[ $ARCH_PACKAGES == "" ]]; then + echo "Repository does not have any dependencies for Arch Linux" + else + pacman -S --needed $ARCH_PACKAGES + fi +} + + +case $os in + "ID=arch") install_arch;; + "ID=artix") + echo "WARNING: You may need standard Arch Linux repositories enabled in pacman." + install_arch;; + + *) echo "Unknown OS\n You must manually install dependencies";; +esac |