Add quick install instructions
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
Git repo of my personal shell profile variables
|
Git repo of my personal shell profile variables
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
### Quick Install
|
||||||
|
|
||||||
|
```
|
||||||
|
curl https://raw.githubusercontent.com/madumlao/madumlao-profile/master/install.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual Install
|
||||||
Copy this directory somewhere in your home directory. The directory should be persistent, so probably keep this in your "projects" directory or somewhere similar. If in doubt, you can keep this under `.local/share/madumlao-profile`.
|
Copy this directory somewhere in your home directory. The directory should be persistent, so probably keep this in your "projects" directory or somewhere similar. If in doubt, you can keep this under `.local/share/madumlao-profile`.
|
||||||
|
|
||||||
Next, run the `install.sh` script. It should backup your existing profile and replace it with symlinks to this version.
|
Next, run the `install.sh` script. It should backup your existing profile and replace it with symlinks to this version.
|
||||||
|
|||||||
30
install.sh
30
install.sh
@@ -1,13 +1,37 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
if ! [ -t 0 ]; then
|
||||||
|
echo "exec from pipe"
|
||||||
|
DOWNLOAD_APP=y
|
||||||
|
APP_DIR="$HOME/.local/share/madumlao-profile"
|
||||||
|
else
|
||||||
|
DOWNLOAD_APP=
|
||||||
APP_DIR="$(dirname "$0")"
|
APP_DIR="$(dirname "$0")"
|
||||||
cd "$APP_DIR"
|
fi
|
||||||
APP_DIR="$(pwd)"
|
|
||||||
|
|
||||||
echo "Run an apt update"
|
echo "Run an apt update"
|
||||||
if sudo -l apt; then
|
if sudo -l apt; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
else
|
||||||
|
echo "Unable to run apt commands, please install manually"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Install git and friends"
|
||||||
|
if sudo -l apt; then
|
||||||
|
sudo apt install git
|
||||||
|
else
|
||||||
|
echo "Unable to autoinstall git and friends, please install manually"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DOWNLOAD_APP" ]; then
|
||||||
|
echo "Downloading master copy"
|
||||||
|
mkdir -pv "$APP_DIR"
|
||||||
|
git clone https://github.com/madumlao/madumlao-profile "$APP_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Set pwd to $APP_DIR"
|
||||||
|
cd "$APP_DIR"
|
||||||
|
APP_DIR="$(pwd)"
|
||||||
|
|
||||||
echo "Install zsh and friends"
|
echo "Install zsh and friends"
|
||||||
if sudo -l apt; then
|
if sudo -l apt; then
|
||||||
sudo apt install zsh command-not-found
|
sudo apt install zsh command-not-found
|
||||||
@@ -62,7 +86,7 @@ IFS="$OLDIFS"
|
|||||||
|
|
||||||
echo "Install vim-nox and friends"
|
echo "Install vim-nox and friends"
|
||||||
if sudo -l apt; then
|
if sudo -l apt; then
|
||||||
sudo apt install vim-nox git
|
sudo apt install vim-nox
|
||||||
else
|
else
|
||||||
echo "Unable to autoinstall vim-nox and friends, please install manually"
|
echo "Unable to autoinstall vim-nox and friends, please install manually"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user