Fix MacOSX

This commit is contained in:
Ivan Ilves 2017-06-06 11:20:17 +02:00
parent d0a8ef3f54
commit c7e00a27d7
2 changed files with 5 additions and 6 deletions

View File

@ -6,9 +6,9 @@ help:
install:
rsync -a ./ $(INSTALL_PATH)/
install -o root -g root -m 0755 wrapper $(WRAPPER_PATH)/xiringuito
install -o root -g root -m 0755 wrapper $(WRAPPER_PATH)/xaval
sed -i "s|__INSTALL_PATH__|$(INSTALL_PATH)|g" $(WRAPPER_PATH)/xiringuito $(WRAPPER_PATH)/xaval
install -o root -g `id -g root` -m 0755 wrapper $(WRAPPER_PATH)/xiringuito
install -o root -g `id -g root` -m 0755 wrapper $(WRAPPER_PATH)/xaval
sed -i -r "s|__INSTALL_PATH__|$(INSTALL_PATH)|g" $(WRAPPER_PATH)/xiringuito $(WRAPPER_PATH)/xaval
uninstall:
rm $(WRAPPER_PATH)/xiringuito $(WRAPPER_PATH)/xaval

5
xaval
View File

@ -2,7 +2,6 @@
#
# xaval - xiringuito connection manager
#
set -u
set -e
set -o pipefail
@ -63,7 +62,7 @@ function suicide_on_existing_profile(){
function select_profile(){
local START_NUMBER=1
local PROFILE_COUNT=$(list_profiles | wc -l)
local PROFILE_COUNT=$(list_profiles | wc -l | sed 's/ //g')
if [[ ${PROFILE_COUNT} -eq 0 ]]; then
print_help
@ -96,7 +95,7 @@ function list_profiles(){
if [[ -z "${FILTER_EXPR}" ]]; then
FILTER_EXPR=".*"
fi
for PROFILE in $(find ${DIR} -type f -printf "%f\n" | egrep "${FILTER_EXPR}" | sort); do
for PROFILE in $(find ${DIR} -type f | awk -F"/" '{print $NF}' | egrep "${FILTER_EXPR}" | sort); do
printf "%-20s = %s\n" ${PROFILE} "$(cat ${DIR}/${PROFILE})"
done
}