diff update-vendor @ 706:4b30df382167

[update-vendor] smarter pack handling?
author nanaya <me@nanaya.net>
date Sun, 18 Dec 2022 22:23:22 +0900
parents 1e0f578f6752
children 4576f1471f53
line wrap: on
line diff
--- a/update-vendor	Sun Dec 18 20:46:51 2022 +0900
+++ b/update-vendor	Sun Dec 18 22:23:22 2022 +0900
@@ -23,13 +23,8 @@
 
 _get_pack_github() {
   (
-    mkdir -p "$1" && cd "$1"
-    wget -nv -O - "$2" | unzip -q -
-    # hopefully only one directory inside
-    _dirname="$(echo *)"
-    mv "./${_dirname}"/* ./
-    mv "./${_dirname}"/.??* ./
-    rmdir "./${_dirname}"
+    wget -nv -O - "$3" | unzip -q -
+    mv "./${1}-${2}" "./${1}"
   )
 }
 
@@ -80,7 +75,7 @@
 
   touch empty
   rm -rf ./*
-  _get_pack_github "srcery-vim" "https://github.com/srcery-colors/srcery-vim/archive/refs/heads/master.zip"
+  _get_pack_github "srcery-vim" "master" "https://github.com/srcery-colors/srcery-vim/archive/refs/heads/master.zip"
 )
 }