[haiku-commits] Re: BRANCH jessicah-github.use-login-shell [a6beadbe7d08] data/etc src/bin

  • From: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Thu, 11 Jun 2015 11:14:19 +1200

On 11 June 2015 at 02:30, Adrien Destugues <pulkomandy@xxxxxxxxx> wrote:

-echo -e "\nWelcome to the Haiku shell.\n"
+ps | grep -e $PPID | grep -e Terminal | grep -q -e $PPID
+if [ $? -eq 0 ] ; then
+ echo -e "\nWelcome to the Haiku shell.\n"
+else
+ echo -e "\nSwitching to architecture `getarch`\n"
+fi

Isn't there a better way to do this? It would print the "switching"
message for any alternative Terminal (fonzoterm, ARPTelnet, whatever).

Yes, I realised it was better to invert the test shortly after pushing
to my branch. See updated commit.

Other related posts: