Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3764359
D1106.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1106.diff
View Options
diff --git a/arcanist/Makefile b/arcanist/Makefile
new file mode 100644
--- /dev/null
+++ b/arcanist/Makefile
@@ -0,0 +1,17 @@
+# ___ ___ __ __ __ __
+# | Y .--.--.-----| |_.-----.----. | |--|__| |_.----.-----.
+# |. | | | | | _| -__| _| | <| | _| _| _ |
+# |. / \ |___ |__|__|____|_____|__| |__|__|__|____|__| |_____|
+# |: |_____|
+# |::.|:. | Dereckson's $HOME/bin personal collection
+# `--- ---' Wynter-kitro edition
+
+INSTALL=/usr/bin/install
+PREFIX?=${HOME}
+
+make:
+
+make install:
+ ${INSTALL} arc-paste-diff.sh ${PREFIX}/bin/arc-paste-diff
+ ${INSTALL} arc-paste-file.sh ${PREFIX}/bin/arc-paste-file
+ ${INSTALL} arc-update-repo.sh ${PREFIX}/bin/arc-update-repo
diff --git a/arcanist/arc-paste-diff.sh b/arcanist/arc-paste-diff.sh
new file mode 100755
--- /dev/null
+++ b/arcanist/arc-paste-diff.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+COLORDIFF=`which colordiff`
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: `basename $0` <paste 1> <paste 2>"
+ exit 1
+fi
+
+if [ "$COLORDIFF" = "" ]; then
+ diff -u <(arc paste $1) <(arc paste $2)
+else
+ diff -u <(arc paste $1) <(arc paste $2) | colordiff
+fi
+
diff --git a/arcanist/arc-paste-file.sh b/arcanist/arc-paste-file.sh
new file mode 100755
--- /dev/null
+++ b/arcanist/arc-paste-file.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+if [ $# -eq 0 ]
+then
+ echo "Usage: `basename $0` <filename>"
+ exit 1
+fi
+
+FILE=$1
+
+if [ ! -f $FILE ]
+then
+ echo "File not found: $FILE"
+ exit 2
+fi
+
+arc paste --title $FILE < $FILE
diff --git a/arcanist/arc-update-repo.sh b/arcanist/arc-update-repo.sh
new file mode 100755
--- /dev/null
+++ b/arcanist/arc-update-repo.sh
@@ -0,0 +1,22 @@
+#!/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 seem 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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 05:19 (16 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257293
Default Alt Text
D1106.diff (2 KB)
Attached To
Mode
D1106: Arcanist script
Attached
Detach File
Event Timeline
Log In to Comment