#!/bin/bash
rm -f /var/lib/apt/lists/lock /var/lib/dpkg/lock
rm -f /etc/apt/sources.list.d/firefox.*
apt-get update
echo "$(date +%U)" > /etc/kona/weekno

apt-get -y install inkscape clementine vlc gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly ffmpegthumbnailer firmware-linux-nonfree tigervnc-standalone-server gstreamer1.0-alsa

[ "$(dpkg -l|grep clementine)" = "" ] && exit

if [ "$(dpkg -l|grep google-chrome-stable)" = "" ]; then
  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  dpkg -i google-chrome-stable_current_amd64.deb
  rm google-chrome-stable_current_amd64.deb
  apt-get -y -f install
fi
#if [ "$(dpkg -l|grep skypeforlinux)" = "" ]; then 
#  wget https://repo.skype.com/latest/skypeforlinux-64.deb
#  dpkg -i skypeforlinux-64.deb
#  rm skypeforlinux-64.deb
#  apt-get -y -f install
#fi
code_version="1.99.1-1743784529"
path="7c6fdfb0b8f2f675eb0b47f3d95eeca78962565b"
codefile="code_${code_version}_amd64.deb"
wget https://vscode.download.prss.microsoft.com/dbazure/download/stable/$path/$codefile
if [ -f $codefile ]; then
  dpkg -i $codefile
  rm $codefilevival
  apt-get -y -f install
fi
vivaldi="vivaldi-stable_7.3.3635.11-1_amd64.deb"
wget https://downloads.vivaldi.com/stable/$vivaldi
if [ -f $vivaldi ]; then
  dpkg -i $vivaldi
  rm $vivaldi
  apt-get -y -f install
fi 

if [ "$(dpkg -l|grep light-locker)" != "" ]; then
  dpkg --purge light-locker
fi

touch /etc/kona/pkgadd
