1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-05 15:05:46 +01:00

Fix 'make install' on Cygwin and make_jar.sh on Cygwin and BSD-ish systems. Closes issue #43.

This commit is contained in:
Kris Maglione
2010-10-05 14:17:53 -04:00
parent 37e209bb15
commit 5c55d163c0
3 changed files with 24 additions and 7 deletions

View File

@@ -111,7 +111,10 @@ install:
profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" |\ profile=$$(sed 's/^$$/\#/' "$$dir/profiles.ini" |\
awk -v"profile=$(PROFILE)" \ awk -v"profile=$(PROFILE)" \
'BEGIN { RS="#" } \ 'BEGIN { RS="#" } \
index($$0, "\nName=" profile "\n") || !profile && /\nDefault=1/' |\ index($$0, "\nName=" profile "\n") { print; exit } \
!profile && /\nName=default\n/ { args["name=default"] = $$0 } \
!profile && /\nDefault=1/ { args["default=1"] = $$0 } \
END { if (args["default=1"]) print args["default=1"]; else print args["name=default"] }' |\
awk -F= '{ args[$$1] = $$2 } \ awk -F= '{ args[$$1] = $$2 } \
END {\ END {\
if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"];\ if (args["IsRelative"]) print ENVIRON["dir"] "/" args["Path"];\
@@ -125,7 +128,10 @@ install:
rm -f "$$ext.xpi"; \ rm -f "$$ext.xpi"; \
rm -rf "$$ext"; \ rm -rf "$$ext"; \
echo "Installing to $$ext"; \ echo "Installing to $$ext"; \
pwd >"$$ext" if which cygpath >/dev/null 2>&1; \
then cygpath -wa .; \
else pwd; \
fi >"$$ext"
installxpi: xpi installxpi: xpi
$(FIREFOX) $(XPI) $(FIREFOX) $(XPI)

View File

@@ -9,19 +9,29 @@ text=$4
bin=$5 bin=$5
shift 5; shift 5;
files="$@" files="$@"
HG=${HG:-hg}
stage="$top/${jar%.*}" stage="$top/${jar%.*}"
mkdir -p $stage mkdir -p $stage
if hg root >/dev/null 2>&1 sed=$(which sed)
if [ "xoo" = x$(echo foo | sed -E 's/f(o)/\1/' 2>/dev/null) ]
then sed() { $sed -E "$@"; }
else sed() { $sed -r "$@"; }
fi
if $HG root >/dev/null 2>&1
then then
root="$(hg root)" root="$($HG root)"
mf="$(hg --config ui.debug=false --config ui.verbose=false manifest)" which cygpath >/dev/null 2>&1 && root=$(cygpath $root)
mf="$($HG --config ui.debug=false --config ui.verbose=false manifest)"
find=$(which find) find=$(which find)
find() { find() {
$find "$@" -name '*.jar' $find "$@" -name '*.jar'
echo "$mf" | sed -n "s!$(pwd | sed "s!$root/\?!!")/\?!!p" | echo "$mf" | sed -n "s!$(pwd | sed "s!$root/?!!")/?!!p" |
grep "^$1" grep "^$1"
exit 1
} }
fi fi

View File

@@ -6,6 +6,7 @@ FIREFOX ?= firefox
HOSTAPP ?= $(FIREFOX) HOSTAPP ?= $(FIREFOX)
PROFILEPATHS ?= "$$HOME/.mozilla/firefox" \ PROFILEPATHS ?= "$$HOME/.mozilla/firefox" \
"$$HOME/Library/Mozilla/Firefox" \ "$$HOME/Library/Mozilla/Firefox" \
"$$APPDATA/Mozilla/Firefox" "$$APPDATA/Mozilla/Firefox" \
"$$AppData/Mozilla/Firefox"
include ../common/Makefile include ../common/Makefile