Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple drop-ins for pushd and popd to prevent some rpmbuild issues #182

Open
wants to merge 1 commit into
base: wip-testing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/sgugpushdpopd/SOURCES/popd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/sgug/bin/bash
DIR_STACK=${DIR_STACK#* }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re @Jenna64bit's error -- maybe invoke cd .. -- it will be at least reliable. Can one of you try this? I just ran into the same issue on my end with another package and this seems like it's 3/4 across the line.

cd ${DIR_STACK%% *}
echo "$PWD"
5 changes: 5 additions & 0 deletions packages/sgugpushdpopd/SOURCES/pushd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/sgug/bin/bash
dirname=$1
export DIR_STACK="$dirname ${DIR_STACK:-$PWD' '}"
cd ${dirname:?"missing directory name."}
echo "$DIR_STACK"
37 changes: 37 additions & 0 deletions packages/sgugpushdpopd/SPECS/sgugpushdpopd.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Name: sgugpushdpopd
Version: 0.1
Release: 1%{?dist}
Summary: Adds pushd and popd to sgug-rse

License: GPL
Source0: pushd
Source1: popd

BuildArch: noarch



%description


%prep
cp -av %{SOURCE0} .
cp -av %{SOURCE1} .


#%build


%install
install -m 755 -p -D %{SOURCE0} $RPM_BUILD_ROOT/usr/sgug/bin/pushd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is totally a better macro for this path but I don't know that I care (the sgug bit)

install -m 755 -p -D %{SOURCE0} $RPM_BUILD_ROOT/usr/sgug/bin/popd


%files
/usr/sgug/bin/pushd
/usr/sgug/bin/popd


%changelog
* Tue Sep 29 2021 Unxmaal <[email protected]> - 0.1-1
- Initial build.