-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from UN-OCHA/release-versions/v3.6.0
release versions/v3.6.0
- Loading branch information
Showing
57 changed files
with
4,383 additions
and
24,419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
## Login into the site. | ||
## | ||
## Usage: fin login [-h] [-u UID] | ||
## | ||
|
||
usage="$(basename "$0") [-h] [-u UID] | ||
where: | ||
-h show this help text | ||
-u|---uid the UID to use for login" | ||
|
||
# Login as user 1 by default. | ||
USER_ID=1 | ||
|
||
while [ "$1" != "" ]; do | ||
case $1 in | ||
-u | --uid ) shift | ||
USER_ID=$1 | ||
;; | ||
-h | --help ) echo "$usage" | ||
exit | ||
;; | ||
* ) echo "$usage" | ||
exit 1 | ||
esac | ||
shift | ||
done | ||
|
||
URL=$(fin drush uli --uid ${USER_ID}) | ||
fin utils/open-link -i $URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
## Open a link in a browser. | ||
## | ||
## Usage: fin utils/open-link [-h|-i] URL | ||
## | ||
|
||
usage="$(basename "$0") [-h|-i] | ||
where: | ||
-i open in incognito mode | ||
-h show this help text" | ||
|
||
INCOGNITO=false | ||
URL='' | ||
|
||
while [ "$1" != "" ]; do | ||
case $1 in | ||
-i | --incognico ) INCOGNITO=true | ||
;; | ||
-h | --help ) echo "$usage" | ||
exit | ||
;; | ||
* ) URL=$1 | ||
esac | ||
shift | ||
done | ||
|
||
if $INCOGNITO; then | ||
open -a "Google Chrome" -n --args --incognito "${URL}" | ||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
xdg-open "${URL}" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
open "${URL}" | ||
else | ||
echo "Unsupported operating system ${OSTYPE}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.