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
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo "create a ssh key"
|
VERSION="2.32.0"
|
||||||
echo "gimme your email: "
|
|
||||||
read EMAIL
|
|
||||||
ssh-keygen -t rsa -C $EMAIL
|
|
||||||
|
|
||||||
echo "create a gpg key"
|
function install () {
|
||||||
gpg --full-generate-key
|
cd ~
|
||||||
gpg --list-secret-keys --keyid-format=long
|
wget https://github.com/git/git/archive/refs/tags/v${VERSION}.zip
|
||||||
echo "enter the secret on sec rsa4096/THIS PART: "
|
sudo unzip v${VERSION}.zip
|
||||||
read SECRETKEY
|
cd git-${VERSION}
|
||||||
gpg --armor --export $SECRETKEY
|
sudo make prefix=/usr/local all
|
||||||
git config --global user.signingkey $SECRETKEY
|
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"
|
function setup () {
|
||||||
echo "then copy the public key block above also to github"
|
echo "create a ssh key"
|
||||||
echo "link to speed up everything: https://github.com/settings/keys"
|
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 ln -s ${DOTFILES_PATH}/git/.czrc $HOME/.czrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sudo chmod -R 755 ./scripts
|
||||||
|
sudo chmod -R 755 ./bin
|
||||||
|
|
||||||
if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then
|
if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade
|
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
|
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
|
set_symlink
|
||||||
elif [[ $(cat /etc/issue) = *"Debian"* ]]; then
|
elif [[ $(cat /etc/issue) = *"Debian"* ]]; then
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get upgrade
|
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 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
|
set_symlink
|
||||||
else
|
else
|
||||||
echo "you will need to install curl, wget, openssl, gpg, and other stuff yourself"
|
echo "you will need to install curl, wget, openssl, gpg, and other stuff yourself"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo chmod -R 755 ./scripts
|
|
||||||
sudo chmod -R 755 ./bin
|
|
||||||
|
|
||||||
./scripts/python.sh install
|
./scripts/python.sh install
|
||||||
|
|
||||||
./scripts/node.sh install
|
./scripts/node.sh install
|
||||||
|
|
Loading…
Reference in New Issue