Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400077
D17582.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
743 B
Referenced Files
None
Subscribers
None
D17582.id.diff
View Options
diff --git a/bin/arc b/bin/arc
--- a/bin/arc
+++ b/bin/arc
@@ -1,14 +1,16 @@
-#!/usr/bin/env bash
+#!/bin/sh
# NOTE: This file is a wrapper script instead of a symlink so it will work in
# the Git Bash environment in Windows.
-# Do bash magic to resolve the real location of this script through aliases,
+# Do shell magic to resolve the real location of this script through aliases,
# symlinks, etc.
-SOURCE="${BASH_SOURCE[0]}";
+SOURCE="$0";
while [ -h "$SOURCE" ]; do
LINK="$(readlink "$SOURCE")";
- if [ "${LINK:0:1}" == "/" ]; then
+ # Test if the first character of $LINK is / by removing it from the front
+ # and testing equality
+ if [ "${LINK#/}" != "$LINK" ]; then
# absolute symlink
SOURCE="$LINK"
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 9:33 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7480209
Default Alt Text
D17582.id.diff (743 B)
Attached To
Mode
D17582: arcanist: arc should work with any POSIX shell
Attached
Detach File
Event Timeline
Log In to Comment