Skip to content

Commit

Permalink
fix(oh-my-zsh-git): add patch (#6314)
Browse files Browse the repository at this point in the history
Co-authored-by: ook37 <[email protected]>
  • Loading branch information
oklopfer and ook37 authored Aug 7, 2024
1 parent 117d676 commit 48b06e1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/oh-my-zsh-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pkgbase = oh-my-zsh-git
gives = oh-my-zsh
pkgver = 0.0.1
pkgrel = 2
pkgdesc = A community-driven framework for managing your zsh configuration
url = https://github.com/ohmyzsh/ohmyzsh
depends = zsh
Expand All @@ -9,5 +10,8 @@ pkgbase = oh-my-zsh-git
license = MIT
maintainer = Oren Klopfer <[email protected]>
source = oh-my-zsh::https://github.com/ohmyzsh/ohmyzsh.git
source = 0001-zshrc.patch
sha256sums = SKIP
sha256sums = 0d57bd1fb0e0e8448e68d537a237102efef4d94d9d73993c7de6cefae61cdb87

pkgname = oh-my-zsh-git
31 changes: 31 additions & 0 deletions packages/oh-my-zsh-git/0001-zshrc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- a/zshrc 2024-06-17 19:14:58.205443310 +0200
+++ b/zshrc 2024-06-17 19:14:55.962092937 +0200
@@ -2,7 +2,7 @@
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

# Path to your Oh My Zsh installation.
-export ZSH=$HOME/.oh-my-zsh
+ZSH=/usr/share/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,
@@ -72,8 +72,6 @@
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

-source $ZSH/oh-my-zsh.sh
-
# User configuration

# export MANPATH="/usr/local/man:$MANPATH"
@@ -102,3 +100,10 @@
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
+
+ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
+if [[ ! -d $ZSH_CACHE_DIR ]]; then
+ mkdir -p $ZSH_CACHE_DIR
+fi
+
+source $ZSH/oh-my-zsh.sh
6 changes: 5 additions & 1 deletion packages/oh-my-zsh-git/oh-my-zsh-git.pacscript
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
pkgname="oh-my-zsh-git"
gives="${pkgname%-git}"
pkgver="0.0.1"
pkgrel="2"
pkgdesc="A community-driven framework for managing your zsh configuration"
url='https://github.com/ohmyzsh/ohmyzsh'
license=('MIT')
depends=('zsh')
optdepends=('ruby: for some plugin functionality'
'python3: for some plugin functionality')
source=("${gives}::https://github.com/${gives//-/}/${gives//-/}.git")
source=("${gives}::https://github.com/${gives//-/}/${gives//-/}.git"
"0001-zshrc.patch")
sha256sums=('SKIP' '0d57bd1fb0e0e8448e68d537a237102efef4d94d9d73993c7de6cefae61cdb87')
maintainer=("Oren Klopfer <[email protected]>")

prepare() {
cd "${gives}"
cp "templates/zshrc.zsh-template" "zshrc"
patch -p1 < "${srcdir}/0001-zshrc.patch"
}

package() {
Expand Down
4 changes: 4 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -6784,6 +6784,7 @@ pkgname = oh-my-posh-git
pkgbase = oh-my-zsh-git
gives = oh-my-zsh
pkgver = 0.0.1
pkgrel = 2
pkgdesc = A community-driven framework for managing your zsh configuration
url = https://github.com/ohmyzsh/ohmyzsh
depends = zsh
Expand All @@ -6792,6 +6793,9 @@ pkgbase = oh-my-zsh-git
license = MIT
maintainer = Oren Klopfer <[email protected]>
source = oh-my-zsh::https://github.com/ohmyzsh/ohmyzsh.git
source = 0001-zshrc.patch
sha256sums = SKIP
sha256sums = 0d57bd1fb0e0e8448e68d537a237102efef4d94d9d73993c7de6cefae61cdb87

pkgname = oh-my-zsh-git
---
Expand Down

0 comments on commit 48b06e1

Please sign in to comment.