mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Corrected use of the tab-stops argument in TABS.sh
Former-commit-id: 1194726925ca3cc5426835c5952875818a75782a Former-commit-id: f687887beb8a64caf757d724eedc9f0fbf4f9f55
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
if [ "$1" = 'TABS' ]; then
|
||||
unexpand -t 4 working/sshyp.py > working/sshyp.py.new
|
||||
unexpand -t 4 working/sshync.py > working/sshync.py.new
|
||||
unexpand -t 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123 working/sshyp.py > working/sshyp.py.new
|
||||
unexpand -t 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123 working/sshync.py > working/sshync.py.new
|
||||
mv working/sshyp.py.new working/sshyp.py
|
||||
mv working/sshync.py.new working/sshync.py
|
||||
chmod +x working/sshyp.py working/sshync.py
|
||||
@@ -9,7 +9,7 @@ elif [ "$(grep -qP '\t' "$1" && echo TABS)" = 'TABS' ]; then
|
||||
printf "$1 contains tab characters...\n"
|
||||
read -rp 'replace with (4) spaces? (Y/n) ' replace
|
||||
if [ "$replace" != 'n' ] && [ "$replace" != 'N' ]; then
|
||||
expand -t 4 "$1" > "$1".new
|
||||
expand -t 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123 "$1" > "$1".new
|
||||
chmod --reference="$1" "$1".new
|
||||
mv "$1".new "$1"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user