summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZee Eichel <zee@dracos-linux.org>2019-05-22 09:29:48 +0700
committerZee Eichel <zee@dracos-linux.org>2019-05-22 09:29:48 +0700
commit1be9eb686d22612caea9c0533052d097726d957c (patch)
treeb01360d24011a158fd32b805f0ecefbf0f21aa19
parent168b17971f2a6c09cf49d9a05fdea89ac165f67b (diff)
downloaddemit.main-core-git.repo-1be9eb686d22612caea9c0533052d097726d957c.tar.gz
demit.main-core-git.repo-1be9eb686d22612caea9c0533052d097726d957c.tar.bz2
demit.main-core-git.repo-1be9eb686d22612caea9c0533052d097726d957c.zip
adding bash into core RC
-rw-r--r--bash/PKGBUILD52
-rw-r--r--bash/bashrc.sh21
-rw-r--r--bash/profile.sh79
-rw-r--r--bash/shells.sh6
4 files changed, 158 insertions, 0 deletions
diff --git a/bash/PKGBUILD b/bash/PKGBUILD
new file mode 100644
index 0000000..c24bcb2
--- /dev/null
+++ b/bash/PKGBUILD
@@ -0,0 +1,52 @@
+#Maintainer: purnomo hadi <dimension.breaker@dracos-linux.org>
+#Contributor: Zee Eichel <zee@dracos-linux.org>
+
+pkgname=bash
+pkgver=5.0
+pkgrel=2
+pkgdesc="The Bash package contains the Bourne-Again SHell. "
+arch=(x86_64)
+group=(dracOscore)
+url="www.gnu.org"
+license=('GPLv3+')
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+source=("http://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz"
+ "bashrc.sh"
+ "shells.sh"
+ "profile.sh"
+ )
+sha256sums=("b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d"
+ "5bb594c74fef26067aae84c239cf9ba83f539bb41f838fd8341fc34cbbac65f8"
+ "1db1de0b837e46cac525afad0b39b41e730114294b209a023f2e7100a3efd2f7"
+ "aa3b7ee2b25d5b4b51d065a3313d02535ab69eba64a38d72875707e3afd8c4e3")
+
+build() {
+ cd "$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --docdir=/usr/share/doc/bash-5.0 \
+ --without-bash-malloc \
+ --with-installed-readline
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -dm755 $pkgdir/bin
+ make DESTDIR="$pkgdir/" install
+ mv -vf $pkgdir/usr/bin/bash $pkgdir/bin
+ install -d $pkgdir/etc
+ install -d $pkgdir/etc/profile.d
+ install -Dm 755 $srcdir/bashrc.sh $pkgdir/etc/bashrc
+ install -Dm 755 $srcdir/profile.sh $pkgdir/etc/profile
+ install -Dm 644 $srcdir/shells.sh $pkgdir/etc/shells
+
+ #remove all documentation
+ if [ -d "$pkgdir/usr/share/man" ]; then
+ rm -rf $pkgdir/usr/share/man
+ fi
+ if [ -d "$pkgdir/usr/share/doc" ]; then
+ rm -rf $pkgdir/usr/share/doc
+ fi
+}
+
diff --git a/bash/bashrc.sh b/bash/bashrc.sh
new file mode 100644
index 0000000..1ebc33b
--- /dev/null
+++ b/bash/bashrc.sh
@@ -0,0 +1,21 @@
+# Begin /etc/bashrc
+# Written for dracOs linux team
+
+# System wide aliases and functions
+
+export TERM='rxvt-unicode'
+
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+
+export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share
+
+if [[ $EUID == 0 ]] ; then
+ PS1="\[\033[38;5;196m\]\u@\h\[$(tput sgr0)\]:\w #\[$(tput sgr0)\]"
+else
+ PS1="\u@\h:\w $\[$(tput sgr0)\]"
+fi
+
+#unset RED NORMAL
+
+# End /etc/bashrc
diff --git a/bash/profile.sh b/bash/profile.sh
new file mode 100644
index 0000000..4a64c5a
--- /dev/null
+++ b/bash/profile.sh
@@ -0,0 +1,79 @@
+# System wide environment variables and startup programs.
+
+# System wide aliases and functions should go in /etc/bashrc. Personal
+# environment variables and startup programs should go into
+# ~/.bash_profile. Personal aliases and functions should go into
+# ~/.bashrc.
+
+# Functions to help us manage paths. Second argument is the name of the
+# path variable to be modified (default: PATH)
+pathremove () {
+ local IFS=':'
+ local NEWPATH
+ local DIR
+ local PATHVARIABLE=${2:-PATH}
+ for DIR in ${!PATHVARIABLE} ; do
+ if [ "$DIR" != "$1" ] ; then
+ NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
+ fi
+ done
+ export $PATHVARIABLE="$NEWPATH"
+}
+
+pathprepend () {
+ pathremove $1 $2
+ local PATHVARIABLE=${2:-PATH}
+ export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
+}
+
+pathappend () {
+ pathremove $1 $2
+ local PATHVARIABLE=${2:-PATH}
+ export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
+}
+
+export -f pathremove pathprepend pathappend
+
+# Set the initial path
+export PATH=/bin:/usr/bin:/opt/bin
+
+if [ $EUID -eq 0 ] ; then
+ pathappend /sbin:/usr/sbin:/opt/sbin
+fi
+
+# Setup some environment variables.
+export HISTSIZE=1000
+export HISTIGNORE="&:[bf]g:exit"
+
+# Set some defaults for graphical systems
+export XDG_DATA_DIRS=/usr/share/
+export XDG_CONFIG_DIRS=/etc/xdg/
+
+# Setup a red prompt for root and a green one for users.
+
+if [[ $EUID == 0 ]] ; then
+ PS1="\[\033[38;5;196m\]\u@\h\[$(tput sgr0)\]:\w #\[$(tput sgr0)\]"
+else
+ PS1="\u@\h:\w $\[$(tput sgr0)\]"
+fi
+
+
+for script in /etc/profile.d/*.sh ; do
+ if [ -r $script ] ; then
+ . $script
+ fi
+done
+
+unset script RED GREEN NORMAL
+export LANG=en_US
+
+if test -z "${XDG_RUNTIME_DIR}"; then
+ export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
+ if ! test -d "${XDG_RUNTIME_DIR}"; then
+ mkdir "${XDG_RUNTIME_DIR}"
+ chmod 0700 "${XDG_RUNTIME_DIR}"
+ fi
+fi
+
+
+# End /etc/profile
diff --git a/bash/shells.sh b/bash/shells.sh
new file mode 100644
index 0000000..de78133
--- /dev/null
+++ b/bash/shells.sh
@@ -0,0 +1,6 @@
+# Begin /etc/shells
+
+/bin/sh
+/bin/bash
+
+# End /etc/shells