mirror of https://github.com/aldy505/dotfiles.git
fix git installation
This commit is contained in:
parent
f0fde89fb9
commit
6adc138502
|
@ -1,18 +1,44 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "create a ssh key"
|
||||
echo "gimme your email: "
|
||||
read EMAIL
|
||||
ssh-keygen -t rsa -C $EMAIL
|
||||
VERSION="2.32.0"
|
||||
|
||||
echo "create a gpg key"
|
||||
gpg --full-generate-key
|
||||
gpg --list-secret-keys --keyid-format=long
|
||||
echo "enter the secret on sec rsa4096/THIS PART: "
|
||||
read SECRETKEY
|
||||
gpg --armor --export $SECRETKEY
|
||||
git config --global user.signingkey $SECRETKEY
|
||||
function install () {
|
||||
cd ~
|
||||
wget https://github.com/git/git/archive/refs/tags/v${VERSION}.zip
|
||||
sudo unzip v${VERSION}.zip
|
||||
cd git-${VERSION}
|
||||
sudo make prefix=/usr/local all
|
||||
sudo make prefix=/usr/local install
|
||||
cd ~
|
||||
sudo rm -rf git-${VERSION}
|
||||
sudo rm v${VERSION}.zip
|
||||
}
|
||||
|
||||
echo "now go to the .ssh directory, copy the contents of the id_rsa.pub to github"
|
||||
echo "then copy the public key block above also to github"
|
||||
echo "link to speed up everything: https://github.com/settings/keys"
|
||||
function setup () {
|
||||
echo "create a ssh key"
|
||||
echo "gimme your email: "
|
||||
read EMAIL
|
||||
ssh-keygen -t rsa -C $EMAIL
|
||||
|
||||
echo "create a gpg key"
|
||||
gpg --full-generate-key
|
||||
gpg --list-secret-keys --keyid-format=long
|
||||
echo "enter the secret on sec rsa4096/THIS PART: "
|
||||
read SECRETKEY
|
||||
gpg --armor --export $SECRETKEY
|
||||
git config --global user.signingkey $SECRETKEY
|
||||
|
||||
echo "now go to the .ssh directory, copy the contents of the id_rsa.pub to github"
|
||||
echo "then copy the public key block above also to github"
|
||||
echo "link to speed up everything: https://github.com/settings/keys"
|
||||
}
|
||||
|
||||
if [ "$1" == "install" ]; then
|
||||
install
|
||||
elif [ "$1" == "setup" ]; then
|
||||
setup
|
||||
elif [ "$1" == "uninstall" ] || [ "$1" == "remove" ]; then
|
||||
uninstall
|
||||
else
|
||||
echo "please specify args with install or uninstall"
|
||||
fi
|
10
setup.sh
10
setup.sh
|
@ -26,23 +26,27 @@ function set_symlink () {
|
|||
sudo ln -s ${DOTFILES_PATH}/git/.czrc $HOME/.czrc
|
||||
}
|
||||
|
||||
sudo chmod -R 755 ./scripts
|
||||
sudo chmod -R 755 ./bin
|
||||
|
||||
if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
sudo add-apt-repository ppa:git-core/ppa
|
||||
sudo apt update
|
||||
sudo apt install -y curl wget openssl tar unzip git rlwrap editorconfig gpg build-essential libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev
|
||||
set_symlink
|
||||
elif [[ $(cat /etc/issue) = *"Debian"* ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get install -y curl wget openssl tar unzip git rlwrap editorconfig gpg build-essential libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev
|
||||
sudo apt-get install -y libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext
|
||||
./scripts/git.sh install
|
||||
set_symlink
|
||||
else
|
||||
echo "you will need to install curl, wget, openssl, gpg, and other stuff yourself"
|
||||
fi
|
||||
|
||||
sudo chmod -R 755 ./scripts
|
||||
sudo chmod -R 755 ./bin
|
||||
|
||||
./scripts/python.sh install
|
||||
|
||||
./scripts/node.sh install
|
||||
|
|
Loading…
Reference in New Issue