aboutsummaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-05 21:08:39 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-05 21:09:19 +1200
commit165c35c70b43349e882bd44be31c0837ab19729b (patch)
tree2a1f4218b78721c3262ac0c0b634629037f50ce6 /check
parentRemove mail/mailrc from ignored files (diff)
downloaddotfiles-165c35c70b43349e882bd44be31c0837ab19729b.tar.gz
dotfiles-165c35c70b43349e882bd44be31c0837ab19729b.zip
More sh flexibility (check/lint scripts)
Diffstat (limited to 'check')
-rw-r--r--[-rwxr-xr-x]check/bash.sh (renamed from check/bash)1
-rwxr-xr-xcheck/bin14
-rw-r--r--check/bin.sh4
-rwxr-xr-xcheck/games14
-rw-r--r--check/games.sh4
-rw-r--r--[-rwxr-xr-x]check/ksh.sh (renamed from check/ksh)1
-rw-r--r--[-rwxr-xr-x]check/man.sh (renamed from check/man)1
-rw-r--r--[-rwxr-xr-x]check/sh.sh (renamed from check/sh)1
-rwxr-xr-xcheck/urxvt9
-rw-r--r--check/urxvt.sh4
-rw-r--r--[-rwxr-xr-x]check/yash.sh (renamed from check/yash)1
-rw-r--r--[-rwxr-xr-x]check/zsh.sh (renamed from check/zsh)1
12 files changed, 12 insertions, 43 deletions
diff --git a/check/bash b/check/bash.sh
index 525bec34..a3efccb1 100755..100644
--- a/check/bash
+++ b/check/bash.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
for bash in bash/* bash/bashrc.d/* ; do
[ -f "$bash" ] || continue
bash -n "$bash" || exit
diff --git a/check/bin b/check/bin
deleted file mode 100755
index 2fc4e767..00000000
--- a/check/bin
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-for bin in bin/* ; do
- [ -x "$bin" ] || continue
- hb=$(sed 1q "$bin") || exit
- case $hb in
- *bash)
- bash -n "$bin" || exit
- ;;
- *sh)
- sh -n "$bin" || exit
- ;;
- esac
-done
-printf 'All shell scripts in bin parsed successfully.\n'
diff --git a/check/bin.sh b/check/bin.sh
new file mode 100644
index 00000000..04b0da6b
--- /dev/null
+++ b/check/bin.sh
@@ -0,0 +1,4 @@
+for bin in bin/*.sh ; do
+ sh -n "$bin" || exit
+done
+printf 'All shell scripts in bin parsed successfully.\n'
diff --git a/check/games b/check/games
deleted file mode 100755
index d3b5feac..00000000
--- a/check/games
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-for game in games/* ; do
- [ -x "$game" ] || continue
- hb=$(sed 1q "$game") || exit
- case $hb in
- *bash)
- bash -n "$game" || exit
- ;;
- *sh)
- sh -n "$game" || exit
- ;;
- esac
-done
-printf 'All shell scripts in games parsed successfully.\n'
diff --git a/check/games.sh b/check/games.sh
new file mode 100644
index 00000000..79d53ed5
--- /dev/null
+++ b/check/games.sh
@@ -0,0 +1,4 @@
+for game in games/*.sh ; do
+ sh -n "$game" || exit
+done
+printf 'All shell scripts in games parsed successfully.\n'
diff --git a/check/ksh b/check/ksh.sh
index 3136c413..51e71e19 100755..100644
--- a/check/ksh
+++ b/check/ksh.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
for ksh in ksh/* ksh/kshrc.d/* ; do
[ -f "$ksh" ] || continue
ksh -n "$ksh" || exit
diff --git a/check/man b/check/man.sh
index ca1c248c..89c03890 100755..100644
--- a/check/man
+++ b/check/man.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
# Check that manual pages and logical binaries match up
# Need some scripts from the source directory
diff --git a/check/sh b/check/sh.sh
index ec3ba339..53d8c4b6 100755..100644
--- a/check/sh
+++ b/check/sh.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
for sh in sh/* sh/profile.d/* sh/shrc.d/* ; do
[ -f "$sh" ] || continue
sh -n "$sh" || exit
diff --git a/check/urxvt b/check/urxvt
deleted file mode 100755
index a40f8559..00000000
--- a/check/urxvt
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-for perl in urxvt/ext/* ; do
- [ -f "$perl" ] || continue
- case $perl in
- *.pl) ;;
- *) perl -c "$perl" >/dev/null || exit ;;
- esac
-done
-printf 'All Perl scripts in urxvt/ext parsed successfully.\n'
diff --git a/check/urxvt.sh b/check/urxvt.sh
new file mode 100644
index 00000000..ee39e6c9
--- /dev/null
+++ b/check/urxvt.sh
@@ -0,0 +1,4 @@
+for perl in urxvt/ext/*.pl ; do
+ perl -c "$perl" || exit
+done
+printf 'All Perl scripts in urxvt/ext parsed successfully.\n'
diff --git a/check/yash b/check/yash.sh
index fb737596..c8722f3d 100755..100644
--- a/check/yash
+++ b/check/yash.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
for yash in yash/* ; do
[ -f "$yash" ] || continue
yash -n "$yash" || exit
diff --git a/check/zsh b/check/zsh.sh
index 39a6c1e9..50335d56 100755..100644
--- a/check/zsh
+++ b/check/zsh.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
for zsh in zsh/* zsh/zshrc.d/* ; do
[ -f "$zsh" ] || continue
zsh -n "$zsh" || exit