summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpomf2gomf.bash9
1 files changed, 5 insertions, 4 deletions
diff --git a/pomf2gomf.bash b/pomf2gomf.bash
index 5241283..8744dc1 100755
--- a/pomf2gomf.bash
+++ b/pomf2gomf.bash
@@ -47,11 +47,12 @@ for file in "$pomf"/*; do
else
ext=".$ext"
fi
- while [ ${#id} -lt 3 ]; do
- id="_$id"
+ name="$id"
+ while [ ${#name} -lt 3 ]; do
+ name="_$name"
done
- id1="${id:0:1}" # first letter
- id2="${id:1:2}" # second and third letter
+ id1="${name:0:1}" # first letter
+ id2="${name:1:2}" # second and third letter
hash1="${sha:0:1}" # first letter
hash2="${sha:1:2}" # second and third letter