Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jessoune29
head.hackage
Commits
7c91a562
Commit
7c91a562
authored
Oct 04, 2019
by
jessoune29
Browse files
Delete travis.sh
parent
00829c4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/travis.sh
deleted
100755 → 0
View file @
00829c4f
#!/bin/bash
set
-e
case
"X
$TRAVIS_EVENT_TYPE
"
in
Xpull_request
)
;;
Xpush
)
;;
X
*
)
echo
"INFO: not a PR; ignoring"
exit
0
;;
X
)
echo
"ERROR: TRAVIS_EVENT_TYPE not set"
exit
1
;;
esac
if
[
-z
"
$TRAVIS_COMMIT_RANGE
"
]
;
then
echo
"ERROR: TRAVIS_COMMIT_RANGE not set"
exit
1
fi
CHANGED_FILES
=(
$(
git diff
--name-only
$TRAVIS_COMMIT_RANGE
)
)
for
FN
in
"
${
CHANGED_FILES
[@]
}
"
;
do
if
[
!
-f
"
$FN
"
]
;
then
echo
"ignoring
$FN
(not a file (anymore))"
continue
fi
if
[[
"
$FN
"
=
~ ^patches/
(
.
*
)[
.]patch
$
]]
;
then
echo
"--------------------------------------------------------------------------------"
echo
"detected patch file '
$FN
'"
if
[[
"
$FN
"
=
~ ^patches/
([
A-Za-z0-9-]+
)
-
([
0-9.]+
)[
.]patch
$
]]
;
then
PKGN
=
"
${
BASH_REMATCH
[1]
}
"
PKGV
=
"
${
BASH_REMATCH
[2]
}
"
echo
"Patch filename looks valid (name = '
$PKGN
', version = '
$PKGV
')"
rm
-rf
travis.tmp/
mkdir
-p
travis.tmp/
pushd
travis.tmp/
echo
"...downloading original tar-ball (w/o revised .cabal file)..."
wget
--no-verbose
"https://hackage.haskell.org/package/
$PKGN
-
$PKGV
.tar.gz"
echo
"...unpacking..."
tar
-xf
"
$PKGN
-
$PKGV
.tar.gz"
cd
"
$PKGN
-
$PKGV
/"
echo
"...applying patch..."
patch
-p1
-i
"../../
$FN
"
echo
"Patch could be applied succesfully!"
popd
else
echo
"invalid package-id"
exit
1
fi
echo
"================================================================================"
else
echo
"ignoring
$FN
"
continue
fi
done
echo
DONE
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment