echo "Install deps..."
repo_list=/etc/apt/sources.list.d/temp_repo.list
echo "deb [trusted=yes] file:$(pwd)/deps ./" > $repo_list

# Extract Version and Architecture from metadata.txt
VERSION=$(grep '^Version:' METADATA.txt | awk '{print $2}')
apt-get update -o Dir::Etc::sourcelist=$repo_list
# apt-get install -y systemd-timesyncd
apt-get install -y --reinstall --allow-downgrades retina-websq=$VERSION

rm $repo_list
apt-get autoremove -y
apt-get clean -y