|
Revision 1481, 0.7 kB
(checked in by chengyu, 9 months ago)
|
ntfs bug fixed
|
| Line | |
|---|
| 1 |
#!/bin/bash |
|---|
| 2 |
|
|---|
| 3 |
echo "Installing MwFetcher v0.1.2 ..." |
|---|
| 4 |
|
|---|
| 5 |
install_path=${1:-"/usr/sbin/"} |
|---|
| 6 |
|
|---|
| 7 |
if [ $(whoami) != root ]; then |
|---|
| 8 |
echo "You must be root to continue install" |
|---|
| 9 |
exit 1 |
|---|
| 10 |
fi |
|---|
| 11 |
|
|---|
| 12 |
if [ ! -d $HOME/.mwfetcher/ ]; then |
|---|
| 13 |
mkdir $HOME/.mwfetcher |
|---|
| 14 |
fi |
|---|
| 15 |
|
|---|
| 16 |
if [ ! -d $HOME/.mwfetcher/tmp_mnt/ ]; then |
|---|
| 17 |
mkdir $HOME/.mwfetcher/tmp_mnt |
|---|
| 18 |
fi |
|---|
| 19 |
|
|---|
| 20 |
if [ ! -d $HOME/.mwfetcher/logs/ ]; then |
|---|
| 21 |
mkdir $HOME/.mwfetcher/logs |
|---|
| 22 |
fi |
|---|
| 23 |
|
|---|
| 24 |
if [ ! -d /tmp/mwfetcher/ ]; then |
|---|
| 25 |
mkdir /tmp/mwfetcher |
|---|
| 26 |
fi |
|---|
| 27 |
|
|---|
| 28 |
if [ ! -e $HOME/.mwfetcher/config ]; then |
|---|
| 29 |
/bin/cp ./src/config $HOME/.mwfetcher/ |
|---|
| 30 |
fi |
|---|
| 31 |
|
|---|
| 32 |
/bin/cp ./src/mwfetcher "$install_path" |
|---|
| 33 |
chmod 755 "$install_path/mwfetcher" |
|---|
| 34 |
|
|---|
| 35 |
echo "Regenerate clean file list if you just upgraded to version 0.1.2!" |
|---|