aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-11-15 08:40:57 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-11-15 08:40:57 +0200
commit1349977100fb53d3b7e9a3722755d4e2321f9521 (patch)
treeae9b2f87154deb1111d2097923bf4d638b2e8198
parent040db42ed01f3077a7222c890acd8cf7fd298cdc (diff)
downloadarching-kaos-tools-1349977100fb53d3b7e9a3722755d4e2321f9521.tar.gz
arching-kaos-tools-1349977100fb53d3b7e9a3722755d4e2321f9521.tar.bz2
arching-kaos-tools-1349977100fb53d3b7e9a3722755d4e2321f9521.zip
Extra safity measures, lol
-rwxr-xr-xbin/ak-update6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ak-update b/bin/ak-update
index 71b91b6..dc040cb 100755
--- a/bin/ak-update
+++ b/bin/ak-update
@@ -1,14 +1,14 @@
#!/bin/bash
-if [ -L $AK_WORKDIR/bin/ak ]
+if [ -L "${AK_WORKDIR}/bin/ak" ]
then
- $source_dir ="$(ls -l $AK_WORKDIR/bin/ak | rev | cut -d ' ' -f 1 | rev | sed 's/bin\/ak//')"
+ source_dir="$(ls -l ${AK_WORKDIR}/bin/ak | rev | cut -d ' ' -f 1 | rev | sed 's/\/bin\/ak//')"
else
echo "Can't update... ak script is not a link"
exit 1
fi
-if [ -d ${source_dir} ] && [ -d ${source_dir}/.git ]
+if [ -d "${source_dir}" ] && [ -d "${source_dir}/.git" ]
then
cd ${source_dir}
git pull