Skip to content

Commit ceb89d4

Browse files
authored
Merge pull request #892 from akinomyoga/update-deprecated-links
* chore(update-deprecated-links): exclude untracked files * chore(update-{deprecated-links,test-cmd-list},runLint): update shebang
2 parents ac4b665 + 820b613 commit ceb89d4

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
is_tracked_by_git()
5+
{
6+
git ls-files --error-unmatch "$1" &>/dev/null
7+
}
8+
49
cd "$(dirname "$0")/completions"
510
for f in *; do
6-
case $f in
7-
Makefile* | README.md) ;;
8-
*) git rm -f $f ;;
9-
esac
11+
if [[ -h $f ]] && is_tracked_by_git "$f"; then
12+
git rm -f "$f"
13+
fi
1014
done
1115
for f in ../../../completions/_*; do
12-
ln -sf $f ${f##*/_}
13-
git add --verbose ${f##*/_}
16+
if is_tracked_by_git "$f"; then
17+
ln -sf $f ${f##*/_}
18+
git add --verbose ${f##*/_}
19+
fi
1420
done

test/runLint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash -u
1+
#!/usr/bin/env bash
2+
set -u
23

34
gitgrep()
45
{

test/update-test-cmd-list

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash -eu
1+
#!/usr/bin/env bash
2+
set -eu
23

34
mydir=$(
45
cd "$(dirname "$0")"

0 commit comments

Comments
 (0)