From c7e4198aa0e011d6e46ec390e471a0d92cd883bf Mon Sep 17 00:00:00 2001 From: Air9 Date: Tue, 17 Mar 2020 19:58:23 +0800 Subject: [PATCH] add color aliases --- generic-release-1.0/color.sh | 19 +++++++++++++++++++ generic-release.spec | 7 ++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 generic-release-1.0/color.sh diff --git a/generic-release-1.0/color.sh b/generic-release-1.0/color.sh new file mode 100644 index 0000000..f146ce4 --- /dev/null +++ b/generic-release-1.0/color.sh @@ -0,0 +1,19 @@ +#/bin/bash +#Copyright (c) [2019] Huawei Technologies Co., Ltd. +#generic-release is licensed under the Mulan PSL v1. +#You can use this software according to the terms and conditions of the Mulan PSL v1. +#You may obtain a copy of Mulan PSL v1 at: +# http://license.coscl.org.cn/MulanPSL +#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR +#PURPOSE. +#See the Mulan PSL v1 for more details. + +alias ls='ls --color=auto' +alias ll='ls -lh' +alias la='ls -lAh' + +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + diff --git a/generic-release.spec b/generic-release.spec index fdd8310..9b5335e 100644 --- a/generic-release.spec +++ b/generic-release.spec @@ -5,7 +5,7 @@ %define dist_release_version 8 %define generic_version 1.0 %define generic_patch_level base -%define generic_release 29 +%define generic_release 30 %define builtin_release_version 1.0 %define current_arch %{_arch} @@ -66,6 +66,7 @@ ANSI_COLOR="0;31" EOF mkdir -p -m 755 $RPM_BUILD_ROOT/etc/profile.d +cp -a color.sh $RPM_BUILD_ROOT/etc/profile.d/ cp -a system-info.sh $RPM_BUILD_ROOT/etc/profile.d/ cp -a performance.sh $RPM_BUILD_ROOT/etc/profile.d/ @@ -115,6 +116,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(0644,root,root,0755) /etc/system-release +/etc/profile.d/color.sh /etc/profile.d/system-info.sh /etc/%{product_family}-release %config(noreplace) /etc/os-release @@ -133,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT /etc/profile.d/performance.sh %changelog +* Sat Mar 17 2020 openEuler Buildteam - 1.0-30 +- add color aliases + * Sat Mar 17 2020 openEuler Buildteam - 1.0-29 - fix changelog