summaryrefslogtreecommitdiffstats
path: root/scripts/open-osz
diff options
context:
space:
mode:
authorJokler <jokler@protonmail.com>2020-06-22 02:15:52 +0200
committerJokler <jokler@protonmail.com>2020-06-22 02:21:55 +0200
commit37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929 (patch)
treeff1446fe9b369112bdd41aaa02bc99343a9ecdf8 /scripts/open-osz
parent1a357dd0a71d8e6d73cc8af4c93d3005576aff36 (diff)
downloaddotfiles-37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929.tar.gz
dotfiles-37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929.zip
Add new scripts and update old ones
Diffstat (limited to 'scripts/open-osz')
-rwxr-xr-xscripts/open-osz14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/open-osz b/scripts/open-osz
new file mode 100755
index 0000000..5557751
--- /dev/null
+++ b/scripts/open-osz
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+SONG_DIR="$HOME/Games/osu/drive_c/osu/Songs"
+
+filename=$(basename -- "$1")
+filename="${filename%.*}"
+DEST_DIR="$SONG_DIR/$filename"
+
+mkdir "$DEST_DIR"
+unzip "$1" -d "$DEST_DIR" | exit 1
+
+rm "$1"
+
+# vim: expandtab sw=2 ts=2