pkg_add init
This commit is contained in:
+19
-1
@@ -32,7 +32,6 @@ function _array_subtract {
|
||||
declare -A exclude
|
||||
for item in "${arr2[@]}"; do exclude["$item"]=1; done
|
||||
|
||||
result=()
|
||||
for item in "${arr1[@]}"; do [[ -z ${exclude["$item"]} ]] && result+=("$item"); done
|
||||
}
|
||||
|
||||
@@ -89,6 +88,25 @@ function _flatten_short_options {
|
||||
args=("${result[@]}")
|
||||
}
|
||||
|
||||
# DISTRO
|
||||
|
||||
function get_distro_like {
|
||||
mapfile -t release </etc/os-release
|
||||
for line in "${release[@]}"; do
|
||||
case "$line" in
|
||||
ID=debian | ID_LIKE=debian)
|
||||
echo debian
|
||||
return
|
||||
;;
|
||||
ID=arch | ID_LIKE=arch)
|
||||
echo arch
|
||||
return
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
## ==============
|
||||
## Deprecated: FIXME: to remove
|
||||
## ==============
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ readonly BACKUP='ORIGINAL'
|
||||
# FUNCTIONS
|
||||
|
||||
function required_packages {
|
||||
"$MIAOU_BASH_DIR/tools/idem_apt_install" "${REQUIRED_PKGS[@]}"
|
||||
"$MIAOU_BASH_DIR"/tools/pkg_add "${REQUIRED_PKGS[@]}"
|
||||
}
|
||||
|
||||
function no_more_skeleton {
|
||||
|
||||
Reference in New Issue
Block a user