auto update

Open
#44 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
bash
Domain
cli

Research direction

The issue identifies .bashrc and provides a proposed update snippet; start by reading the repository's .bashrc and checking how its current update behavior is defined. The issue is complete only when the intended update behavior and its safety expectations are agreed and the resulting behavior is verified.

Written by the indexing model from the issue text.

Description

snagged the idea form the powershell script still trying to figure out pull reqs but I added This to my .bashrc and it has been updating

#inserted at line22

########### automaticaly get bash update from github ###########
# replace CTT with git username
REPO_URL="https://github.com/ChrisTitusTech/mybash.git"
BRANCH="main"  # 
#
#  .bashrc file
BASHRC_FILE="$HOME/.bashrc"

# temp save bash file
TEMP_FILE=$(mktemp)

# grab updated bash 
# replace CTT with git username
curl -sSL "https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/.bashrc" -o "$TEMP_FILE"

# repalce bash with new
if [ -s "$TEMP_FILE" ]; then
    mv -f "$TEMP_FILE" "$BASHRC_FILE" # no confirm before saving
   # mv  "$TEMP_FILE" "$BASHRC_FILE" # will ask for confrm before saving
    echo "updated .bashrc successfully."
else
    echo "failed to update .bashrc."
fi
####### end of update #########
Dominant language
Shell
Stars
693
Forks
243
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ChrisTitusTech/mybash

All issues in ChrisTitusTech/mybash

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.