From fee80e06d8cb661ee70cd4d676b5455c163b650e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 9 Feb 2015 22:17:02 -0500 Subject: path.sh, config-path: don't rely on external programs (sed) --- .config/login.d/00_path.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.config') diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh index a45f8fd..f4ca3a6 100644 --- a/.config/login.d/00_path.sh +++ b/.config/login.d/00_path.sh @@ -1,9 +1,7 @@ -#!/bin/sh - if type config-path &>/dev/null; then config_path=config-path else # Bootstrap finding config-path config_path="$HOME/.local/bin/config-path" fi -eval "$("$config_path" | sed 's/^/export /')" +eval "$(IFS=$'\n'; lines=($("$config_path")); printf -- 'export %s\n' "${lines[@]}")" -- cgit v1.2.3-54-g00ecf