Skip to content

camphi/ready-to-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

ready-to-patch

script ready for a patch

curl -LO https://raw.githubusercontent.com/camphi/ready-to-patch/refs/heads/master/patch.sh && git diff >> patch.sh

mkpatch() {
  if [[ -t 0 || "$1" == "-?" || "$1" == "-h" || "$1" == "--help" ]]
  then
    echo 'Usage: git diff | mkpatch {patch-name.sh}'
    return
  fi

  if [[ -e "$1" ]]; then
    echo "Error: $1 already exists."
    return 1
  fi

  patch_name=${1:-"patch_"$(date -Iminutes)".sh"}
  curl -Lo "$patch_name" https://raw.githubusercontent.com/camphi/ready-to-patch/refs/heads/master/patch.sh &>/dev/null
  cat - >> "$patch_name"
  echo "$patch_name"
}

About

script ready for a patch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages