Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Paste
P131
arc-update-repo
Active
Public
Actions
Authored by
dereckson
on Nov 19 2015, 02:46.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F13014: arc-update-repo
Mar 12 2016, 03:49
2016-03-12 03:49:18 (UTC+0)
Subscribers
None
#!/bin/sh
ROOT_DIR
=
`
git rev-parse --show-toplevel
2
>/dev/null
`
if
[
"
$?
"
-ne
"0"
]
;
then
ROOT_DIR
=
`
hg root
2
>/dev/null
`
if
[
"
$?
"
-ne
"0"
]
;
then
echo
"Doesn't seen to be a Git or Mercurial repository."
exit
fi
fi
if
[
! -f
$ROOT_DIR
/.arcconfig
]
;
then
echo
'Create a .arcconfig file with "repository.callsign" : "..." (without the leading r) option.'
exit
fi
CALLSIGN
=
`
cat
$ROOT_DIR
/.arcconfig
|
jq
'."repository.callsign"'
`
if
[
"
$CALLSIGN
"
=
"null"
]
;
then
echo
'Add to your .arcconfig file a "repository.callsign" : "..." (without the leading r) option.'
exit
fi
echo
"{ \"callsigns\": [\"
$CALLSIGN
\"] }"
|
arc call-conduit diffusion.looksoon > /dev/null
Event Timeline
dereckson
edited the content of this paste.
(Show Details)
Nov 19 2015, 02:46
2015-11-19 02:46:56 (UTC+0)
dereckson
changed the title of this paste from untitled to
arc-update-repo
.
Log In to Comment