-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathubuntu-easy-config.sh
executable file
·74 lines (63 loc) · 1.52 KB
/
ubuntu-easy-config.sh
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
70
71
72
73
74
#!/bin/bash
# Part of ubuntu-easy-config https://github.com/minwook-shin/ubuntu-easy-config
#
# See LICENSE file for copyright and license details
#
# This program written for beginner for ubuntu and "ubuntu Setting" by minwook Shin and hedone21, fmowl10
# in 21st and 22sc of November 2015
VERSION=0.1.1 #version
argc=$#
argv0=$0
argv1=$1
#argcv process
argcv()
{
if [ $argc -gt 0 ];
then
if [ "$argv1" == "-h" -o "$argv1" == "--help" ];
then
echo -e "How to use: ./ubuntu-easy-config.sh [option]"
echo -e "option:"
echo -e "\t-h, --help\t Show Help."
echo -e "\t-v, --version\t Show version information."
echo -e "\t-s, --setting\t Before running."
fi
if [ "$argv1" == "-v" -o "$argv1" == "--version" ];
then
echo $VERSION
fi
if [ "$argv1" == "-s" -o "$argv1" == "--setting" ];
then
setting
fi
exit 0
fi
}
#Setting the language file
setting(){
cd lang/
echo "script start"
msgfmt -o main_en.mo main_en.po
echo "main/messages_en.mo created !"
msgfmt -o desktop_en.mo desktop_en.po
echo "desktop/messages_en.mo created !"
exit 0
}
#Launch app
runnigapp(){
cd pages/
echo "run ubuntu-easy-config."
python main_page.py
# echo "You can exit this terminal."
}
#Check permissions
checkingroot(){
if [ $(id -u) -ne 0 ]; then
echo This script requires root.$sudo ./ubuntu-easy-config.sh
exit 0
fi
}
#running core
argcv
checkingroot
runnigapp