Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3764791
D1118.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
D1118.diff
View Options
diff --git a/arcanist/arc-paste-diff.sh b/arcanist/arc-paste-diff.sh
--- a/arcanist/arc-paste-diff.sh
+++ b/arcanist/arc-paste-diff.sh
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
-COLORDIFF=`which colordiff`
+COLORDIFF=$(which colordiff)
if [ $# -ne 2 ]
then
- echo "Usage: `basename $0` <paste 1> <paste 2>"
+ echo "Usage: $(basename "$0") <paste 1> <paste 2>"
exit 1
fi
if [ "$COLORDIFF" = "" ]; then
- diff -u <(arc paste $1) <(arc paste $2)
+ diff -u <(arc paste "$1") <(arc paste "$2")
else
- diff -u <(arc paste $1) <(arc paste $2) | colordiff
+ diff -u <(arc paste "$1") <(arc paste "$2") | colordiff
fi
diff --git a/arcanist/arc-paste-file.sh b/arcanist/arc-paste-file.sh
--- a/arcanist/arc-paste-file.sh
+++ b/arcanist/arc-paste-file.sh
@@ -1,16 +1,16 @@
#!/bin/sh
if [ $# -eq 0 ]
then
- echo "Usage: `basename $0` <filename>"
+ echo "Usage: $(basename "$0") <filename>"
exit 1
fi
FILE=$1
-if [ ! -f $FILE ]
+if [ ! -f "$FILE" ]
then
echo "File not found: $FILE"
exit 2
fi
-arc paste --title $FILE < $FILE
+arc paste --title "$FILE" < "$FILE"
diff --git a/arcanist/arc-update-repo.sh b/arcanist/arc-update-repo.sh
--- a/arcanist/arc-update-repo.sh
+++ b/arcanist/arc-update-repo.sh
@@ -1,19 +1,19 @@
#!/bin/sh
-ROOT_DIR=`git rev-parse --show-toplevel 2>/dev/null`
+ROOT_DIR=$(git rev-parse --show-toplevel 2>/dev/null)
if [ "$?" -ne "0" ]; then
- ROOT_DIR=`hg root 2>/dev/null`
+ 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
+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"'`
+CALLSIGN=$(jq '."repository.callsign"' < "$ROOT_DIR/.arcconfig")
if [ "$CALLSIGN" = "null" ]; then
echo 'Add to your .arcconfig file a "repository.callsign" : "..." (without the leading r) option.'
exit
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 08:22 (17 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257571
Default Alt Text
D1118.diff (2 KB)
Attached To
Mode
D1118: Improve Arcanist shell scripts
Attached
Detach File
Event Timeline
Log In to Comment