home · contact · privacy
Update mpv config.
[config] / setup_scripts / misc.sh
1 #!/bin/sh
2 set -e
3 debian_version="bookworm"
4 legal_system_names="x220 w530"
5 config_tree_prefix="${HOME}/config/${debian_version}"
6 setup_scripts_dir="${config_tree_prefix}/setup_scripts"
7 aptmark_dir="${config_tree_prefix}/apt-mark"
8
9 expect_n_args() {
10     min_args="$1"
11     explainer="$2"
12     shift 2
13     if [ "$#" -lt "${min_args}" ]; then
14         echo "Need at least ${1} arguments … ${explainer}"
15         false
16     fi
17 }
18
19 get_system_name_arg() {
20     found=0
21     for system_name_i in $legal_system_names; do
22         if [ "$1" = "$system_name_i" ]; then
23             found=1
24             system_name="${system_name_i}"
25             continue    
26         fi
27     done
28     if [ "$found" = 0 ]; then
29         echo "Need legal system name."
30         false
31     fi
32 }