added exclude packages script
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
picom.conf##class.arch_laptop
|
picom.conf##class.arch_desktop
|
||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
# read list of packages to exclude from update
|
||||||
|
exclude_list_file=~/.setup/packages/exclude_from_updating.list
|
||||||
|
exclude_list=$(cat $exclude_list_file)
|
||||||
|
|
||||||
|
pacman_config_file=/etc/pacman.conf
|
||||||
|
|
||||||
|
# get current IngorePkg line from pacman.conf
|
||||||
|
# line may have # at the beginning
|
||||||
|
old_ignore_line=$(grep -P "^#?IgnorePkg" $pacman_config_file)
|
||||||
|
echo old_ignore_line: $old_ignore_line
|
||||||
|
|
||||||
|
# split line at = and take second part
|
||||||
|
old_packages_line=$(echo $old_ignore_line | cut -d= -f2)
|
||||||
|
echo old_packages_line: $old_packages_line
|
||||||
|
|
||||||
|
# extract list of packages from line, separated by spaces
|
||||||
|
old_ignore_packages=$(echo $old_packages_line| tr -s ' ' '\n')
|
||||||
|
echo old_packages: $old_packages
|
||||||
|
|
||||||
|
# add packages to ignore line, if not already there
|
||||||
|
new_ignore_packages=$old_ignore_packages
|
||||||
|
for package in $exclude_list; do
|
||||||
|
if [[ ! $old_ignore_packages =~ $package ]]; then
|
||||||
|
new_ignore_packages="$new_ignore_packages $package"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# join packages with spaces
|
||||||
|
new_ignore_packages_line=$(echo $new_ignore_packages | tr '\n' ' ')
|
||||||
|
echo new_ignore_packages_line: $new_ignore_packages_line
|
||||||
|
|
||||||
|
# add IgnorePkg= to beginning of line
|
||||||
|
new_ignore_line="IgnorePkg = $new_ignore_packages_line"
|
||||||
|
echo new_ignore_line: $new_ignore_line
|
||||||
|
|
||||||
|
# replace old IgnorePkg line with new one
|
||||||
|
echo "updating pacman.conf"
|
||||||
|
sudo sed -i "s/$old_ignore_line/$new_ignore_line/" $pacman_config_file
|
||||||
|
|
||||||
|
echo "done"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
cuda
|
||||||
|
cudnn
|
||||||
@@ -32,9 +32,6 @@ if [ -d $HOME/.local/bin ] ; then
|
|||||||
PATH="$HOME/.local/bin:$PATH"
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add the custom functions from the .custom_functions file
|
|
||||||
custom_func_dir=$HOME/.scripts
|
|
||||||
for f in $custom_func_dir/*; do source $f; done
|
|
||||||
|
|
||||||
# key bindings
|
# key bindings
|
||||||
# create a zkbd compatible hash;
|
# create a zkbd compatible hash;
|
||||||
@@ -151,3 +148,9 @@ bindkey '5C' forward-word
|
|||||||
bindkey '^[[3~' delete-char
|
bindkey '^[[3~' delete-char
|
||||||
|
|
||||||
powerline-config tmux setup
|
powerline-config tmux setup
|
||||||
|
|
||||||
|
alias vim=nvim
|
||||||
|
|
||||||
|
# add the custom functions from the .custom_functions file
|
||||||
|
custom_func_dir=$HOME/.scripts
|
||||||
|
for f in $custom_func_dir/*; do source $f; done
|
||||||
|
|||||||
Reference in New Issue
Block a user