Last active
August 29, 2015 14:19
-
-
Save Self-Perfection/d03ed332f39038b63899 to your computer and use it in GitHub Desktop.
Patch: faster shell launch in developer mode on SailfishOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /etc/profile.d/developer-profile.sh 2015-02-11 03:14:12.000000000 +0300 | |
+++ script_versions/developer-profile.sh_v1 2015-04-26 14:42:19.212224189 +0300 | |
@@ -98,13 +98,12 @@ | |
ENV_SET=$(cat /proc/$SESSION_PID/environ | sed -e 's/\x00/\n/g' | grep -wvF "$BLACK_LIST_VALUES") | |
while read ENV_PAIR | |
do | |
- echo $ENV_PAIR | grep -qwF "$WHITE_LIST_VALUES" | |
- if [ $? -ne 0 ]; then | |
- echo "NOTICE: Env value ignored $ENV_PAIR" | |
- else | |
- eval export `echo $ENV_PAIR | sed -e 's/=\(.*\)/=\"\1\"/'` | |
- fi | |
- done < <(echo "$ENV_SET") | |
+ echo "NOTICE: Env value ignored $ENV_PAIR" | |
+ done < <(echo "$ENV_SET"| grep -wvF "$WHITE_LIST_VALUES") | |
+ while read ENV_PAIR | |
+ do | |
+ export "$ENV_PAIR" | |
+ done < <(echo "$ENV_SET"| grep -wF "$WHITE_LIST_VALUES") | |
else | |
# No session running | |
echo "NOTICE: There is no systemd user session running" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussion @ TJC