summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-07-03 08:22:53 +0200
committerclsr <clsr@clsr.net>2016-07-03 08:22:53 +0200
commit426c71f6007bb9fa5b917047484c2109c95b7dd3 (patch)
tree2b94b6a54b06090cd0ff515b87df576b2154a7f1
parent37b770793de4fa6406ccea4c8191ffd5d2b816ed (diff)
downloadgomf-tools-426c71f6007bb9fa5b917047484c2109c95b7dd3.tar.gz
gomf-tools-426c71f6007bb9fa5b917047484c2109c95b7dd3.zip
Update pomf2gomf for gomf-0.4.0
-rwxr-xr-xpomf2gomf.bash10
1 files changed, 5 insertions, 5 deletions
diff --git a/pomf2gomf.bash b/pomf2gomf.bash
index 8744dc1..7f3d172 100755
--- a/pomf2gomf.bash
+++ b/pomf2gomf.bash
@@ -48,13 +48,13 @@ for file in "$pomf"/*; do
ext=".$ext"
fi
name="$id"
- while [ ${#name} -lt 3 ]; do
+ while [ ${#name} -lt 4 ]; do
name="_$name"
done
- 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
+ id1="${name:0:2}" # first two letters
+ id2="${name:2:2}" # third and fourth letter
+ hash1="${sha:0:2}" # first two letters
+ hash2="${sha:2:2}" # third and fourth letter
hashd="$gomf/upload/files/$hash1/$hash2/$sha"
idd="$gomf/upload/ids/$id1/$id2/$id"