#!/bin/sh
M(){
ntf -w "2А fix: Обновлен $1" "Старый сохроанен $1.old" &
}

post_install() {
x="/home/`sfsusr`/.xinitrc" 
mv "$x" "$x.old" 
mv /usr/local/share/2a/.xinitrc "$x" && M "$x"

x=/usr/local/share/applications/netctl-gui.desktop
#mv "$x" "$x.old" 
rm /usr/local/share/applications/wifi-menu.desktop
mv /usr/local/share/2a/netctl-gui.desktop "$x" #&& M "$x"

mv /usr/local/share/2a/wifi-menu.sh /usr/local/bin/wifi-menu.sh
mv /usr/local/share/2a/pacman.conf /etc/pacman.conf

mv /usr/local/share/2a/ethernet-dhcp /etc/netctl/
systemctl disable systemd-networkd
netctl  enable ethernet-dhcp

#  glib-compile-schemas /usr/share/glib-2.0/schemas
#  update-desktop-database -q
#  gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
}

post_upgrade() {
  post_install
}
