Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
devel:hw
:
droid:tools
>
android-tools
> _service:gitpkg:0007-Add-support-for-.mersdkubu.profile.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:gitpkg:0007-Add-support-for-.mersdkubu.profile.patch of Package android-tools
From 79922cd5cfaa41027f0e9373db285ecb23a01253 Mon Sep 17 00:00:00 2001 From: David Greaves <david@dgreaves.com> Date: Tue, 1 Apr 2014 12:50:59 +0100 Subject: [PATCH] Add support for ~/.mersdkubu.profile Signed-off-by: David Greaves <david.greaves@jollamobile.com> --- mer-android-chroot | 2 +- mer-ubusdk-bash-setup | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 mer-ubusdk-bash-setup diff --git a/mer-android-chroot b/mer-android-chroot index 97fef0a..eb9adf4 100755 --- a/mer-android-chroot +++ b/mer-android-chroot @@ -274,7 +274,7 @@ do_it_all() { 0 ) echo "Entering chroot as $user" # setarch x86_64 chroot ${uburoot} /bin/su -s /bin/bash -l $user -- -c "if [ -d \"$cwd\" ]; then cd \"$cwd\"; fi; exec bash --init-file /mer-bash-setup -i" - setarch x86_64 chroot ${uburoot} /usr/bin/sudo -i -u $user "if [ -d \"$cwd\" ]; then cd \"$cwd\"; fi; exec bash --init-file /mer-bash-setup -i" + setarch x86_64 chroot ${uburoot} /usr/bin/sudo -i -u $user "if [ -d \"$cwd\" ]; then cd \"$cwd\"; fi; exec bash --init-file /parentroot/usr/share/ubu-chroot/mer-ubusdk-bash-setup -i" ;; * ) if [[ $1 == 'exec' ]]; then diff --git a/mer-ubusdk-bash-setup b/mer-ubusdk-bash-setup new file mode 100644 index 0000000..3ffa532 --- /dev/null +++ b/mer-ubusdk-bash-setup @@ -0,0 +1,14 @@ +# This emulates normal bash login behaviour +export MERSDK=1 +[[ -e /etc/profile ]] && . /etc/profile + +if [[ -e ~/.bash_profile ]] ; then + . ~/.bash_profile +elif [[ -e ~/.bash_login ]] ; then + . ~/.bash_login +elif [[ -e ~/.profile ]] ; then + . ~/.profile +fi + +[[ -e ~/.mersdkubu.profile ]] && . ~/.mersdkubu.profile + -- 1.8.4.5