-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosu-i
executable file
·69 lines (54 loc) · 3.34 KB
/
osu-i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# This script will clone osu-stuff repo and export it to the path.
# This depends on: git, curl
osus="$HOME/.osu-stuff" # Make osu-stuff directory as $osus
cat << \EOF
_ __ __
___ ___ _ _ ___| |_ _ _ / _|/ _|
/ _ \/ __| | | |_____/ __| __| | | | |_| |_
| (_) \__ \ |_| |_____\__ \ |_| |_| | _| _|
\___/|___/\__,_| |___/\__|\__,_|_| |_|
Welcome to osu-stuff installation!
EOF
cat << EOF
All the scripts will be dropped in $osus.
EOF
# Check if `git` is installed.
printf "Checking few things before start....\\n"
! git --help >/dev/null 2>&1 && printf "\033[31mYou are missing \`git\`, install it from your package manager and run the installer again.\033[0m\\n" && exit
printf "Cleaning mess....\\n"
rm -rf $osus >/dev/null 2>&1 # Remove directory with osu-stuff (that's for updating)
# Clone `osustuff` and drop it in `$osus`
printf "Cloning osu-stuff from GitHub....\\n"
! git clone https://github.com/yurisuki/osu-stuff.git $osus && printf "\033[31mCloning failed! Check your internet connection!\033[0m\\n" && exit
clear && printf "Downloaded!\\n"
printf "Doing some things before finishing....\\n"
# Remove unnecessary files
cd $osus
rm README.md osu-i scripts
echo "export PATH=\$PATH:$osus" >> ~/.bashrc # Add osu-stuff directory as $PATH variable
echo "osu-stuff was cloned in $osus"
source ~/.bashrc # Source ~/.bashrc, so you can use these commands immediately
cat << \EOF
_ __ __
___ ___ _ _ ___| |_ _ _ / _|/ _|
/ _ \/ __| | | |_____/ __| __| | | | |_| |_
| (_) \__ \ |_| |_____\__ \ |_| |_| | _| _|
\___/|___/\__,_| |___/\__|\__,_|_| |_|
Downloaded!
Here's a list with all files inside osu-stuff repository.
| FILE | LANGUAGE | DESCRIPTION | DEPENDENCIES |
|----------- |---------- |----------------------------------------------------------------------------------------------------- |-------------- |
| osu | shell | This script runs osu! installed by 'lutris'. | - |
| osu.png | png | osu! logo | - |
| osuauto | shell | This script will download beatmaps from given link. | curl, xclip |
| osumove | shell | This script moves all maps in ~/Downloads to osu! songs directory. | - |
| osu-i | shell | This script will clone osu-stuff repo and export it to the path. | git |
| osudir | shell | This file includes your osu! directory used by scripts. | - |
| osunew | shell | This script will download about ~40 new ranked maps. | curl |
| osusearch | shell | Gives a dmenu prompt to search osu.ppy.sh for downloading map. Without input, will open osu.ppy.sh. | dmenu, curl |
EOF
cat << EOF
osu-i has put $osus (scripts directory) to your \$PATH, which means that you can just write (e.g. osusearch) and it will be executed.
To make this work, you need to reload \`bash\`.
EOF