blob: 55c901f1378d377d5338ff48d9062f06a3f3da84 (
plain)
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
p="$1"
mkconfig() {
echo "Editor=nano" > $config
}
echo -e "\e[32mWell, let's see what can be restored here..."
echo -e "------------------------------------\e[0m"
if [[ -d $p"apps" ]]; then
echo "Catalog 'apps' found..."
else
echo "The catalog apps not exist, starnge..."
echo "Creating..."
mkdir -p $p"apps"
fi
if [[ -d $p"scripts" ]]; then
echo "Catalog 'scripts' found..."
else
echo "The cataog scripts not exist, strange..."
echo "Creating..."
mkdir -p $p"scripts"
fi
if [[ -d "$HOME/.config/app-opener" ]]; then
echo "Config catalog found..."
else
echo "Config catalog and config not exist..."
echo "Creating..."
mkdir -p "$HOME/.config/app-opener"
mkconfig
fi
if [[ -f "$config" ]]; then
echo "The config found..."
else
echo "The config not exist..."
echo "Creating..."
mkconfig
fi
echo -e "\e[32m------------------------------------"
echo -e "Recovery end...\e[0m"
exit 0
|