mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 00:00:13 -08:00
Compare commits
4 Commits
8ceeeda560
...
1287168961
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1287168961 | ||
|
|
645d10d548 | ||
|
|
fa44ab2e45 | ||
|
|
40cbecdebf |
@@ -3,7 +3,7 @@
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="/home/acedanger/.oh-my-zsh"
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
@@ -100,6 +100,8 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# Automatically use node version specified in .nvmrc if present
|
||||
# Only enable if nvm is loaded
|
||||
if command -v nvm_find_nvmrc > /dev/null 2>&1; then
|
||||
autoload -U add-zsh-hook
|
||||
load-nvmrc() {
|
||||
local nvmrc_path="$(nvm_find_nvmrc)"
|
||||
@@ -116,8 +118,9 @@ load-nvmrc() {
|
||||
}
|
||||
add-zsh-hook chpwd load-nvmrc
|
||||
load-nvmrc
|
||||
fi
|
||||
|
||||
[[ -s /home/acedanger/.autojump/etc/profile.d/autojump.sh ]] && source /home/acedanger/.autojump/etc/profile.d/autojump.sh
|
||||
[[ -s $HOME/.autojump/etc/profile.d/autojump.sh ]] && source $HOME/.autojump/etc/profile.d/autojump.sh
|
||||
|
||||
# Enable bash completion compatibility in zsh
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
|
||||
@@ -61,14 +61,24 @@ if ! command -v git &>/dev/null; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# Create shell directory if it doesn't exist
|
||||
mkdir -p "$HOME/shell"
|
||||
|
||||
# Clone or update repository
|
||||
if [ -d "$DOTFILES_DIR" ]; then
|
||||
if [ -d "$DOTFILES_DIR/.git" ]; then
|
||||
echo -e "${YELLOW}Updating existing shell repository...${NC}"
|
||||
cd "$DOTFILES_DIR"
|
||||
git pull origin $DOTFILES_BRANCH
|
||||
elif [ -d "$DOTFILES_DIR" ]; then
|
||||
echo -e "${YELLOW}Directory exists but is not a git repository.${NC}"
|
||||
# Check if directory is empty
|
||||
if [ -z "$(ls -A "$DOTFILES_DIR")" ]; then
|
||||
echo -e "${YELLOW}Directory is empty. Cloning...${NC}"
|
||||
git clone "https://github.com/$DOTFILES_REPO.git" "$DOTFILES_DIR"
|
||||
else
|
||||
echo -e "${YELLOW}Backing up existing directory...${NC}"
|
||||
mv "$DOTFILES_DIR" "${DOTFILES_DIR}.bak.$(date +%s)"
|
||||
echo -e "${YELLOW}Cloning shell repository...${NC}"
|
||||
git clone "https://github.com/$DOTFILES_REPO.git" "$DOTFILES_DIR"
|
||||
fi
|
||||
cd "$DOTFILES_DIR"
|
||||
else
|
||||
echo -e "${YELLOW}Cloning shell repository...${NC}"
|
||||
git clone "https://github.com/$DOTFILES_REPO.git" "$DOTFILES_DIR"
|
||||
|
||||
@@ -291,7 +291,8 @@ for pkg in "${special_installs[@]}"; do
|
||||
# Download and install the latest Fabric binary for Linux AMD64
|
||||
curl -L https://github.com/danielmiessler/fabric/releases/latest/download/fabric-linux-amd64 -o /tmp/fabric
|
||||
chmod +x /tmp/fabric
|
||||
sudo mv /tmp/fabric /usr/local/bin/fabric echo -e "${GREEN}Fabric binary installed successfully!${NC}"
|
||||
sudo mv /tmp/fabric /usr/local/bin/fabric
|
||||
echo -e "${GREEN}Fabric binary installed successfully!${NC}"
|
||||
|
||||
# Verify installation
|
||||
if fabric --version; then
|
||||
|
||||
Reference in New Issue
Block a user