save point
This commit is contained in:
parent
6b681df935
commit
8f893d246e
3 changed files with 19 additions and 4 deletions
|
@ -9,13 +9,13 @@
|
||||||
|
|
||||||
if [ -x "$(command -v apt-get)" ]; then
|
if [ -x "$(command -v apt-get)" ]; then
|
||||||
# set environment variable for os
|
# set environment variable for os
|
||||||
export osp="Debian"
|
osp="Debian"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if pacman is installed
|
# check if pacman is installed
|
||||||
|
|
||||||
if [ -x "$(command -v pacman)" ]; then
|
if [ -x "$(command -v pacman)" ]; then
|
||||||
export osp="Arch"
|
osp="Arch"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# I know its so high tech and amazing right?
|
# I know its so high tech and amazing right?
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "You should run this script as root"
|
echo "You should run this script as root"
|
||||||
sleep 3
|
sleep 3
|
||||||
|
@ -7,8 +9,8 @@ if [ "$(id -u)" != "0" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check the OS, it sets a env variable as a result
|
# Check the OS, it sets a env variable as a result
|
||||||
./os_probe.bash
|
source ./os_probe.bash
|
||||||
./check.bash
|
source ./check.bash
|
||||||
|
|
||||||
# Some menu things
|
# Some menu things
|
||||||
|
|
||||||
|
@ -46,6 +48,7 @@ function copy_config() {
|
||||||
tmpdir=$(mktemp -d)
|
tmpdir=$(mktemp -d)
|
||||||
echo $tmpdir
|
echo $tmpdir
|
||||||
cp -r /etc/ $tmpdir
|
cp -r /etc/ $tmpdir
|
||||||
|
# if [${osp} = "Debian"]; then
|
||||||
dpkg --get-selections > $tmpdir/installed_packages
|
dpkg --get-selections > $tmpdir/installed_packages
|
||||||
arcdir=$(mktemp -d)
|
arcdir=$(mktemp -d)
|
||||||
echo $arcdir
|
echo $arcdir
|
||||||
|
|
12
test.bash
Executable file
12
test.bash
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source ./os_probe.bash
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$osp" = "Debian" ]; then
|
||||||
|
echo "Debian"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$osp" = "Arch" ]; then
|
||||||
|
echo "Arch"
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue