Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
F
FreeBSD ports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
FreeBSD
FreeBSD ports
Commits
413dced1
You need to sign in or sign up before continuing.
Commit
413dced1
authored
1 year ago
by
Muhammad Moinur Rahman
Browse files
Options
Downloads
Patches
Plain Diff
sysutils/gitwatch: Update version 0.1.a.20200814=>0.2
Changelog:
https://github.com/gitwatch/gitwatch/releases/tag/v0.2
parent
f8d1934c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
sysutils/gitwatch/Makefile
+2
-3
2 additions, 3 deletions
sysutils/gitwatch/Makefile
sysutils/gitwatch/distinfo
+3
-3
3 additions, 3 deletions
sysutils/gitwatch/distinfo
sysutils/gitwatch/files/patch-gitwatch.sh
+0
-127
0 additions, 127 deletions
sysutils/gitwatch/files/patch-gitwatch.sh
with
5 additions
and
133 deletions
sysutils/gitwatch/Makefile
+
2
−
3
View file @
413dced1
PORTNAME
=
gitwatch
DISTVERSION
=
0.1.a.20200814
DISTVERSIONPREFIX
=
v
DISTVERSION
=
0.2
CATEGORIES
=
sysutils
MAINTAINER
=
bofh@FreeBSD.org
...
...
@@ -17,8 +18,6 @@ USES= shebangfix
USE_GITHUB
=
yes
USE_RC_SUBR
=
${
PORTNAME
}
GH_TAGNAME
=
e62df74
SHEBANG_FILES
=
${
WRKSRC
}
/
${
PORTNAME
}
.sh
NO_ARCH
=
yes
...
...
This diff is collapsed.
Click to expand it.
sysutils/gitwatch/distinfo
+
3
−
3
View file @
413dced1
TIMESTAMP = 1
605403644
SHA256 (gitwatch-gitwatch-0.
1.a.20200814-e62df74_GH0.tar.gz) = d66d9fa89619a693c3441dbf59ddd11fa4048f85f63194452a
68
0
24
d75aa3b8a
SIZE (gitwatch-gitwatch-0.
1.a.20200814-e62df74
_GH0.tar.gz) = 2
1889
TIMESTAMP = 1
702485900
SHA256 (gitwatch-gitwatch-
v
0.
2_GH0.tar.gz) = 38fd762d2fa0e18312b50f056d9fd888c3038dc2882516
68
7
24
7b541b6649b25
SIZE (gitwatch-gitwatch-
v
0.
2
_GH0.tar.gz) = 2
5123
This diff is collapsed.
Click to expand it.
sysutils/gitwatch/files/patch-gitwatch.sh
deleted
100644 → 0
+
0
−
127
View file @
f8d1934c
---
gitwatch.sh.orig 2020-11-15 05:05:21 UTC
+++ gitwatch.sh
@@
-43
,6 +43,9 @@
COMMITMSG
=
"Scripted auto-commit on change (%d) by gitw
LISTCHANGES=-1
LISTCHANGES_COLOR="
--color
=
always
"
GIT_DIR=""
+GIT="
$(
which git
)
"
+INW="
$(
which inotifywait
)
";
+EVENTS="
${
EVENTS
:-
close_write
,move,move_self,delete,create,modify
}
"
# Print a message about how to use this script
shelp () {
@@ -97,12 +100,6 @@ shelp () {
echo "
It is therefore recommended to terminate the script before changing the repo
's"
echo "config and restarting it afterwards."
echo ""
- echo "By default, gitwatch tries to use the binaries \"git\" and \"inotifywait\","
- echo "expecting to find them in the PATH (it uses '
which
' to check this and will"
- echo "abort with an error if they cannot be found). If you want to use binaries"
- echo "that are named differently and/or located outside of your PATH, you can define"
- echo "replacements in the environment variables GW_GIT_BIN and GW_INW_BIN for git"
- echo "and inotifywait, respectively."
}
# print all arguments to stderr
@@ -118,11 +115,6 @@ cleanup () {
exit 0
}
-# Tests for the availability of a command
-is_command () {
- hash "$1" 2>/dev/null
-}
-
###############################################################################
while getopts b:d:h:g:L:l:m:p:r:s:e: option # Process command line options
@@ -149,65 +141,20 @@ if [ $# -ne 1 ]; then # If no command line arguments a
exit # and exit
fi
-# if custom bin names are given for git or inotifywait, use those; otherwise fall back to "git" and "inotifywait"
-if [ -z "$GW_GIT_BIN" ]; then GIT="git"; else GIT="$GW_GIT_BIN"; fi
-
-if [ -z "$GW_INW_BIN" ]; then
- # if Mac, use fswatch
- if [ "$(uname)" != "Darwin" ]; then
- INW="inotifywait";
- EVENTS="${EVENTS:-close_write,move,move_self,delete,create,modify}"
- else
- INW="fswatch";
- # default events specified via a mask, see
- # https://emcrisostomo.github.io/fswatch/doc/1.14.0/fswatch.html/Invoking-fswatch.html#Numeric-Event-Flags
- # default of 414 = MovedTo + MovedFrom + Renamed + Removed + Updated + Created
- # = 256 + 128+ 16 + 8 + 4 + 2
- EVENTS="${EVENTS:---event=414}"
- fi;
-else
- INW="$GW_INW_BIN";
-fi
-
-# Check availability of selected binaries and die if not met
-for cmd in "$GIT" "$INW"; do
- is_command "$cmd" || { stderr "Error: Required command '
$cmd
' not found." ; exit 1; }
-done
-unset cmd
-
###############################################################################
SLEEP_PID="" # pid of timeout subprocess
trap "cleanup" EXIT # make sure the timeout is killed when exiting script
-
# Expand the path to the target to absolute path
-if [ "$(uname)" != "Darwin" ]; then
- IN=$(readlink -f "$1")
-else
- if is_command "greadlink"; then
- IN=$(greadlink -f "$1")
- else
- IN=$(readlink -f "$1")
- if [ $? -eq 1 ]; then
- echo "Seems like your readlink doesn'
t support
'-f'
.
Running without. Please
'brew install coreutils'
.
"
- IN=
$(
readlink
"
$1
"
)
- fi
- fi;
-fi;
+IN=
$(
readlink
-f
"
$1
"
)
-
if [ -d "
$1
" ]; then # if the target is a directory
TARGETDIR=
$(
sed
-e
"s/
\/
*
$/
/"
<<<
"
$IN
"
)
# dir to CD into before using git commands: trim trailing slash, if any
# construct inotifywait-commandline
- if [ "
$(
uname
)
" != "
Darwin
" ]; then
- INW_ARGS=("
-qmr
" "
-e
" "
$EVENTS
" "
--exclude
" "
'(\.git/|\.git$)'
" "
\"
$TARGETDIR
\"
")
- else
- # still need to fix EVENTS since it wants them listed one-by-one
- INW_ARGS=("
--recursive
" "
$EVENTS
" "
--exclude
" "
'(\.git/|\.git$)'
" "
\"
$TARGETDIR
\"
")
- fi;
+ INW_ARGS=("
-qmr
" "
-e
" "
$EVENTS
" "
--exclude
" "
'(\.git/|\.git$)'
" "
\"
$TARGETDIR
\"
")
GIT_ADD_ARGS="
--all
.
" # add "
.
" (CWD) recursively to index
GIT_COMMIT_ARGS="" # add -a switch to "
commit
" call just to be sure
@@ -215,11 +162,7 @@ elif [ -f "
$1
" ]; then # if the target is a single fil
TARGETDIR=
$(
dirname
"
$IN
"
)
# dir to CD into before using git commands: extract from file name
# construct inotifywait-commandline
- if [ "
$(
uname
)
" != "
Darwin
" ]; then
- INW_ARGS=("
-qm
" "
-e
" "
$EVENTS
" "
$IN
")
- else
- INW_ARGS=("
$EVENTS
" "
$IN
")
- fi
+ INW_ARGS=("
-qm
" "
-e
" "
$EVENTS
" "
$IN
")
GIT_ADD_ARGS="
$IN
" # add only the selected file to index
GIT_COMMIT_ARGS="" # no need to add anything more to "
commit
" call
@@ -260,6 +203,8 @@ if [ -n "
$REMOTE
" ]; then # are we pushing to a remote
PUSH_CMD="
$GIT
push
$REMOTE
$BRANCH
"
fi
fi
+elif [ -n
$(
$GIT
config
--get
remote.origin.url
)
] ; then
+ PUSH_CMD="
$GIT
push
"
else
PUSH_CMD="" # if not remote is selected, make sure push command is empty
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment