home · contact · privacy
Improve shell scripting.
[config] / all_new_2018 / symlink_etc.sh
index 238d136123d2bbf92d74b432a27a0d620fbb5f3f..08f19135ddbcb3528fc68a82ff3f48d9868ca975 100644 (file)
@@ -6,9 +6,9 @@
 set -e
 
 target="$1"
-config_tree_prefix="~/config/all_new_2018/linkable_etc_files/"
-cd "$config_tree_prefix""$target"
+config_tree_prefix="${HOME}/config/all_new_2018/linkable_etc_files/"
+cd "${config_tree_prefix}""${target}"
 for path in $(find .); do
-    dest=$(echo "$path" | cut -c2-)
-    ln -fs "$path" "$dest"
+    dest=$(echo "${path}" | cut -c2-)
+    ln -fs "${path}" "${dest}"
 done