-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminecraft
More file actions
executable file
·44 lines (34 loc) · 920 Bytes
/
minecraft
File metadata and controls
executable file
·44 lines (34 loc) · 920 Bytes
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
#!/bin/bash
#===================================================
# Shell script to start minecraft with different
# "profiles". Each profile needs to be stored
# in ~/.minecraft_<PROFILENAME>. The base directory
# .minecraft shall not exist, but needs to be
# initially created as symlink. Change your
# Minecraft.jar path.
#===================================================
if [ -z "$1" ]
then
echo "give name of profile as argument or --list to list availables"
exit 1
else
PROFILE=$1
fi
if [ $PROFILE = "--list" ]
then
ls -ld ~/.minecraft_*
exit 0
fi
if [ ! -L ~/.minecraft ]
then
echo ".minecraft is not a symbolic link, script does nothing but exits"
exit 3
fi
PROFDIR=~/.minecraft_$PROFILE
if [ ! -d "$PROFDIR" ]
then
echo do not know profile $PROFILE or directory $PROFDIR
exit 2
fi
ln -sfn $PROFDIR ~/.minecraft
java -Xmx2048m -jar ~/bin/Minecraft.jar