-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_ffmpeg.sh
executable file
·59 lines (49 loc) · 1.98 KB
/
install_ffmpeg.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
#!/usr/bin/env bash
if ! test -f checks/check_system.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/checks/check_system.sh)"
else
. ./checks/check_system.sh
fi
if ! test -f checks/check_envvar_aliases_completions_keybinds.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/checks/check_envvar_aliases_completions_keybinds.sh)"
else
. ./checks/check_envvar_aliases_completions_keybinds.sh
fi
if ! type update-system &> /dev/null; then
if ! test -f aliases/.bash_aliases.d/update-system.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/aliases/.bash_aliases.d/update-system.sh)"
else
. ./aliases/.bash_aliases.d/update-system.sh
fi
fi
if test -z $SYSTEM_UPDATED; then
reade -Q "CYAN" -i "y" -p "Update system? [Y/n]: " "n" updatesysm
if test $updatesysm == "y"; then
update-system
fi
fi
if ! type ffmpeg &> /dev/null; then
if test $machine == 'Mac' && type brew &> /dev/null; then
brew install ffmpeg
elif test $distro == "Arch" || test $distro == "Manjaro"; then
eval "$pac_ins ffmpeg"
elif [ $distro_base == "Debian" ]; then
eval "$pac_ins ffmpeg "
fi
fi
if type ffmpeg &> /dev/null; then
ffmpgsh=$(pwd)/aliases/.bash_aliases.d/ffmpeg.sh
if ! test -f $ffmpgsh; then
wget -P $TMPDIR/ https://raw.githubusercontent.com/excited-bore/dotfiles/main/aliases/.bash_aliases.d/ffmpeg.sh
ffmpgsh=$TMPDIR/ffmpeg.sh
fi
function ins_ffmpg_r(){
sudo cp -vf $ffmpgsh /root/.bash_aliases.d/
}
function ins_ffmpg(){
cp -vf $ffmpgsh ~/.bash_aliases.d/nix.sh
yes_edit_no ins_ffmpg_r "$ffmpgsh" "Install ffmpeg.sh to /root? (nix bash aliases)" "yes" "GREEN";
}
yes_edit_no ins_ffmpg "$ffmpgsh" "Install ffmpeg.sh to $HOME? (nix bash aliases)" "yes" "GREEN"
unset ffmpgsh
fi