diff --git a/big-skel/usr/share/libalpm/hooks/big-change-bashrc.hook b/big-skel/usr/share/libalpm/hooks/big-change-bashrc.hook new file mode 100755 index 0000000..78f9d4a --- /dev/null +++ b/big-skel/usr/share/libalpm/hooks/big-change-bashrc.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = etc/skel/.dot.bashrc + +[Action] +Description = BigLinux change skel .bashrc +When = PostTransaction +Exec = /usr/share/libalpm/scripts/big-change-bashrc diff --git a/big-skel/usr/share/libalpm/scripts/big-change-bashrc b/big-skel/usr/share/libalpm/scripts/big-change-bashrc new file mode 100755 index 0000000..f961b00 --- /dev/null +++ b/big-skel/usr/share/libalpm/scripts/big-change-bashrc @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Replacing the original /etc/skel/.bashrc file with the modified Biglinux file +cFile='/etc/skel/.bashrc' +cbakFile='/etc/skel/.bashrc.bak' +cnewFile='/etc/skel/.dot.bashrc' + +if [ -e "$cnewFile" ]; then + if [ -e "$cFile" ]; then + mv -f "$cFile" "$cbakFile" + fi + mv -f "$cnewFile" "$cFile" +fi diff --git a/pkgbuild/PKGBUILD b/pkgbuild/PKGBUILD index 2999d90..2a011ee 100644 --- a/pkgbuild/PKGBUILD +++ b/pkgbuild/PKGBUILD @@ -12,11 +12,6 @@ conflicts=('bashrc-manjaro') provides=('bashrc') source=("git+https://github.com/biglinux/big-skel.git") md5sums=(SKIP) -if [ -e "${pkgname}.install" ];then - install=${pkgname}.install -elif [ -e "pkgbuild.install" ];then - install=pkgbuild.install -fi package() { # Verify default folder diff --git a/pkgbuild/pkgbuild.install b/pkgbuild/pkgbuild.install deleted file mode 100644 index 57a0f24..0000000 --- a/pkgbuild/pkgbuild.install +++ /dev/null @@ -1,32 +0,0 @@ -## arg 1: the new package version -#pre_install() { - # do something here -#} - -## arg 1: the new package version -#post_install() { - # do something here -#} - -## arg 2: the old package version -#pre_upgrade() { - # do something here -#} - -## arg 2: the old package version -post_upgrade() { - if [ -e /etc/skel/.dot.bashrc ];then - echo xpto1 - fi -} - -## arg 1: the old package version -#pre_remove() { - # do something here -#} - -## arg 1: the old package version -#post_remove() { - # do something here -#} -