!57 add alias.sh

From: @zou_lin77 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-07-06 07:36:55 +00:00 committed by Gitee
commit 2d40b9c913
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 32 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: bash
Version: 5.1.8
Release: 1
Release: 2
Summary: It is the Bourne Again Shell
License: GPLv3
URL: https://www.gnu.org/software/bash
@ -22,6 +22,7 @@ Patch133: bash-4.3-noecho.patch
Patch134: bash-4.3-memleak-lc_all.patch
Patch137: bugfix-Forbidden-non-root-user-to-clear-history.patch
Patch138: enable-dot-logout-and-source-bashrc-through-ssh.patch
Patch139: cd-alias.patch
BuildRequires: gcc bison texinfo autoconf ncurses-devel
# Required for bash tests
@ -73,6 +74,7 @@ ln -sf bash %{buildroot}%{_bindir}/sh
install -pDm 644 %SOURCE1 %{buildroot}/etc/skel/.bashrc
install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile
install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout
install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh
# bug #820192, need to add execable alternatives for regular built-ins
for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait
@ -95,6 +97,7 @@ make check
%config(noreplace) /etc/skel/.b*
%{_bindir}/{sh,bash,alias,bg,cd,command,fc,fg,wait,bashbug}
%{_bindir}/{hash,getopts,jobs,read,type,ulimit,umask,unalias}
%config(noreplace) %{_sysconfdir}/profile.d/alias.sh
%files devel
%defattr(-,root,root)
@ -113,6 +116,12 @@ make check
%exclude %{_infodir}/dir
%changelog
* Wed Jul 6 2022 zoulin <zoulin13@h-partners.com> - 5.1.8-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add alias.sh
* Thu Dec 30 2021 wangjie <wangjie375@huawei.com> - 5.1.8-1
- Type:enhancement
- ID:NA

22
cd-alias.patch Normal file
View File

@ -0,0 +1,22 @@
From f6a9a357599631e114a3a574591b411d515949eb Mon Sep 17 00:00:00 2001
From: licunlong <licunlong1@huawei.com>
Date: Tue, 5 Jul 2022 16:07:47 +0800
Subject: [PATCH] cd alias
---
configs/alias.sh | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 configs/alias.sh
diff --git a/configs/alias.sh b/configs/alias.sh
new file mode 100644
index 0000000..563121b
--- /dev/null
+++ b/configs/alias.sh
@@ -0,0 +1,4 @@
+# User specific aliases and functions
+
+alias ..='cd ..'
+alias ...='cd ../..'
--
2.27.0