#!/bin/bash

thefile="../password.txt"
mypass=$(cat "$thefile")

dbname=python

echo " Making Kepler Database for current python packages"

repo-add packages/$dbname.db.tar.xz packages/*x86_64*.gz

rm -v packages/$dbname.db
rm -v packages/$dbname.files

cp -vrf packages/$dbname.db.tar.xz packages/$dbname.db
cp -vrf packages/$dbname.files.tar.xz packages/$dbname.files

rm -v packages/$dbname.db.tar.xz
rm -v packages/$dbname.files.tar.xz

echo " python Database Build finished successfully "

read -p "Wanna push the python packages now? Respond with y or n " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
    echo "Pushing the python packages to gitlab"
    sleep 3
    git add -A
    git commit -a -m "pushes to the latest python build xD"
    git push https://gitlab-ci-token:$mypass@git.n64.cc/ufolinux/repository/x86_64/python main
else

    echo " NVM Push python packages later Alien"
fi
