diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-06-28 09:46:04 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-06-28 09:46:04 +0200 |
commit | dacafd3cd7f0656ebf12f2845b17224a121b693f (patch) | |
tree | 84019e3443190ca1be84e06ed03a750b83c1d502 /accounts/gkleen@sif/zshrc | |
parent | 3a85c6891dc862ec39ccd53dbd7424b8b5264a34 (diff) | |
download | nixos-dacafd3cd7f0656ebf12f2845b17224a121b693f.tar nixos-dacafd3cd7f0656ebf12f2845b17224a121b693f.tar.gz nixos-dacafd3cd7f0656ebf12f2845b17224a121b693f.tar.bz2 nixos-dacafd3cd7f0656ebf12f2845b17224a121b693f.tar.xz nixos-dacafd3cd7f0656ebf12f2845b17224a121b693f.zip |
...
Diffstat (limited to 'accounts/gkleen@sif/zshrc')
-rw-r--r-- | accounts/gkleen@sif/zshrc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index 2d71f5a3..1b7cc06c 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
@@ -181,8 +181,14 @@ dir() { | |||
181 | templateArchive=${archiveFile} | 181 | templateArchive=${archiveFile} |
182 | fi | 182 | fi |
183 | 183 | ||
184 | case $(file --brief --mime-type ${templateArchive}) in | 184 | case $(file --brief --mime-type --dereference ${templateArchive}) in |
185 | application/zip) unzip ${templateArchive} ;; | 185 | application/zip) unzip ${templateArchive} ;; |
186 | application/vnd.debian.binary-package) | ||
187 | nix shell nixos#binutils --command ar x ${templateArchive} | ||
188 | mkdir control data | ||
189 | tar -C control -xvaf control.* | ||
190 | tar -C data -xvaf data.* | ||
191 | ;; | ||
186 | *) tar -xvaf ${templateArchive} ;; | 192 | *) tar -xvaf ${templateArchive} ;; |
187 | esac | 193 | esac |
188 | ) | 194 | ) |