This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit 8b4f7c7 1 parent 5d773e9 commit 8b4f7c7 Copy full SHA for 8b4f7c7
File tree 1 file changed +29
-3
lines changed
1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -765,8 +765,32 @@ pkg_updates() {
765
765
# Update each repository in '$KISS_PATH'. It is assumed that
766
766
# each repository is 'git' tracked.
767
767
for repo; do
768
- log " [${repo##*/ } ]: Updating repository."
769
- (cd " $repo " ; git rev-parse --git-dir > /dev/null && git pull)
768
+ cd " $repo "
769
+
770
+ # Go to the root of the repository (if it exists).
771
+ cd " $( git rev-parse --show-toplevel 2> /dev/null) " 2> /dev/null || :
772
+
773
+ [ -d .git ] || {
774
+ log " [$repo ]: Not a git repository, skipping..."
775
+ continue
776
+ }
777
+
778
+ case $repos in
779
+ # If the repository has already been updated, skip it.
780
+ * " $PWD " * ) ;;
781
+ * )
782
+ repos=" $repos $PWD "
783
+
784
+ log " [$PWD ]: Updating repository."
785
+
786
+ if [ -w " $PWD " ]; then
787
+ git pull
788
+ else
789
+ log " [$PWD ]: Need root to update."
790
+ sudo git pull
791
+ fi
792
+ ;;
793
+ esac
770
794
done
771
795
772
796
log " Checking for new package versions..."
@@ -818,6 +842,8 @@ pkg_clean() {
818
842
# to the build.
819
843
[ " $KISS_DEBUG " = 1 ] && return
820
844
845
+ log " Cleaning cache directories..."
846
+
821
847
# Remove temporary directories.
822
848
rm -rf -- " $mak_dir " " $pkg_dir " " $tar_dir "
823
849
@@ -967,7 +993,7 @@ args() {
967
993
968
994
# Print version and exit.
969
995
v|ve|ver|vers|versi|versio|version)
970
- log " kiss 0.6.0 "
996
+ log " kiss 0.6.1 "
971
997
;;
972
998
973
999
# Print usage and exit.
You can’t perform that action at this time.
0 commit comments