3 # Make sure that the working directory is clean and does not have untracked
4 # files; otherwise our semi-automatic finding the new files will not work!
13 git diff-files
--ignore-submodules --quiet &&
14 git diff-index
--cached --ignore-submodules --quiet HEAD
&&
15 others
="$(git ls-files --exclude-standard --others)" &&
17 die
"State not pristine enough for successful package update"
20 # Remove old files stored in fileList.txt
22 test -z "$FILELIST" && {
23 echo "No file list specified for pre_install"
26 ! test -s "$FILELIST" ||
27 cat "$FILELIST" |
(cd / && xargs git
rm --ignore-unmatch) ||
33 (cd / && git add
-N .
) ||
exit
35 git
diff --cached --ignore-submodules --diff-filter=AM
--name-only |
36 sed -e "s/^/\//" > "$FILELIST" ||
39 git add
"$FILELIST" ||
exit
41 echo "Successfully built and installed $package $version"
42 echo "After checking the result, please commit (possibly with --amend)"
48 die
"Script did not specify an archive"
50 echo "Downloading $tar ..."
51 curl
$url/$tar -o $tar ||
exit
57 die
"Script did not specify a directory"
59 echo "Unpacking $tar ..."
75 test -d "$d"/.git
&& return
76 patchdir
="$(pwd)"/patches
79 git config
--local core.autocrlf false
&&
81 git commit
-m initial
&&
82 for p
in "$patchdir"/*.
patch
91 die
"Script did not specify a directory"
92 test -f "$d/Makefile" ||
93 (cd "$d" && .
/configure
$configure_options) ||
exit
98 die
"Script did not specify a directory"
99 (cd "$d" && make) ||
exit
102 download_extract_setup_and_compile
() {